If I add a .htaccess file, then the site crashes, the browser displays:
Internal Server Error
I was unable to complete your request.
It can be caused by the error.
May be available in the server error log.
If I add a .htaccess file, then the site crashes, the browser displays:
Internal Server Error
I was unable to complete your request.
It can be caused by the error.
May be available in the server error log.
In the configs of the domain from Apache, the following should be allowed:
AllowOverride ALL Bring this config file here. I had the same problem on VDS, I decided to just this line.
most likely mod_rewrite in the configs is commented out
If the .htaccess file is empty, then delete it nafig, if it is really for some reason you need to register these necessary lines into it, otherwise the error will remain.
Well, or write to him
RewriteEngine on RewriteBase / In general, you can throw off the Apache log file, and there it will be much clearer because of what the error crashes. Without logs nothing is clear. It is quite possible that .htaccess is not empty, that there is some string in it, or it is saved in UTF-8 bom. that will most likely give an error. Options I can write a car and a cart, but the point? The file code is here, the Apache log is also here :)
But still possible in the Apache config is turned off.
It is necessary to remove the # character at the beginning of line 156 in apache\conf\httpd.conf . And write AllowOverride All on lines 229, 265, 378 (line numbers may vary).
When the software product has the ability to view the error log, then when an error occurs, you should:
Specifically for Apache - more precisely, I have a WampServer , which includes Apache - I have always been helped by method 1 several times. The description of the errors in the log is quite detailed and understandable.
Without the contents of the log, it is impossible to say exactly what the problem is, 500 Internal Server Error can be issued for several reasons. Judging by the results that I got when I googled in search of a solution to a similar problem, most users are helped by replacing #LoadModule rewrite_module modules/mod_rewrite.so strings in #LoadModule rewrite_module modules/mod_rewrite.so in httpd.conf file.
Personally, the removal of all comments in .htaccess helped me, solved the problem by sorting out the log.
Source: https://ru.stackoverflow.com/questions/86226/
All Articles