cancel
Showing results for 
Search instead for 
Did you mean: 

1.9.3 .htaccess error 500

1.9.3 .htaccess error 500

in the upgrade for 1.9.3 I see in my .htaccess file this section

 

 

<IfModule mod_setenvif.c>
<IfModule mod_headers.c>
############################################
# X-Content-Type-Options: nosniff disable content-type sniffing on some browsers.
Header set X-Content-Type-Options: nosniff
############################################
# This header forces to enables the Cross-site scripting (XSS) filter in browsers (if disabled)
BrowserMatch \bMSIE\s8 ie8
Header set X-XSS-Protection: "1; mode=block" env=!ie8
</IfModule>
</IfModule>

This gives me an error 500 and will not load the site unless i comment it out. 

in the logs i get the error

[Mon Nov 07 12:35:39.479899 2016] [core:alert] [pid 142858]  </IfModule> without matching <IfModule> section

 

If i comment that section out it is fine

8 REPLIES 8

Re: 1.9.3 .htaccess error 500

Hi @tagteamc,

 

Can you check if you have installed/enabled the headers module on Apache?

Re: 1.9.3 .htaccess error 500

Yes, when I run httpd -l I see mod_headers.c in the list

However, when I run php -m i don't see anything like headers in that list, is there supposed to be anything in the php list?

Re: 1.9.3 .htaccess error 500

Check with:

 

 

apachectl -M

Or:

 

 

httpd -M

I guess that second option will work for you.

You'll see the list of enabled Apache's modules. The value that you want is:

 

headers_module (shared)

Re: 1.9.3 .htaccess error 500

Yes  headers_module (static) is in the list for httpd -M

Re: 1.9.3 .htaccess error 500

Sorry but I can't reproduce the error.

Which browser are you using to navigate the store?

Re: 1.9.3 .htaccess error 500

I have tried both chrome and firefox.   If i uncomment those lines i get

 

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator at ------- to inform them of the time this error occurred, and the actions you performed just before this error.
More information about this error may be available in the server error log.
Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.

Re: 1.9.3 .htaccess error 500

Can you check the error on your apache errors logs?

Maybe you'll find some clue inside that log.

Re: 1.9.3 .htaccess error 500

yes, I have checked the log and the error i get is

 

[Mon Nov 07 12:35:39.479899 2016] [core:alert] [pid 142858]  </IfModule> without matching <IfModule> section

 

However, as you can see from the other posts I have checked apache for mod headers and it is there.