Syntax error from htaccess on a line unsure what is wrong with the line

424 Views Asked by At

HI all not too familiar with coding however. Trying to disable hotlinking from htacess as it is not enabled on cpanel. If my woocommerce sends a mail to a user all images are hotlink protected. Im trying to disable this but the error im getting on cpanel is

AH00526: Syntax error on line 97 of /home/f6502669/public_html/.htaccess.cnzOkKh8bL2j8FntD1hdnZea5t8Ts25E: Header has too many arguments

This is line 97 RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1 [R=301,L,E=HTTPS:1] underneath is content security policy.

Basically what needs fixing on Line 97 so that on cpanel i can take away the file extentions that were hotlink protected.

1

There are 1 best solutions below

0
oujisan2236 On

Nevermind the csp had no " and ' two lines down this seems to of fixed the issue.

RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1 [R=301,L,E=HTTPS:1]
    Header set Content-Security-Policy: "default-src'