My .htaccess file causes 500 Internal Server Error
Options -Indexes
AddDefaultCharset utf-8
#DefaultLanguage bg
ServerSignature Off
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_URI} !webroot
RewriteRule ^$ webroot/ [L]
RewriteRule (.*) webroot/$1 [L]
</IfModule>
The mod_rewrite module is on and I think that the line that causes the problem is this one:
RewriteRule ^$ webroot/ [L]
If I drop the RewriteRule lines from the file it all works but as soon as I add them I get the 500 error. I have just some basic knowledge of .htaccess files so any tips and explanations are more than welcome. Thank you!
EDIT: For reference, here's the .htaccess file in the webroot folder, as requested in the comments:
Options -Indexes
AddDefaultCharset utf-8
#DefaultLanguage bg
ServerSignature Off
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php [QSA,L]
</IfModule>
I'll try to access the apache log files and see if I can get some guidance from the records there.
ANOTHER EDIT: Here are the apache logged errors:
[Sun Jun 14 14:27:19 2015] [error] [client SOME_IP_ADDRESS] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace., referer: SOME_REFERER [Sun Jun 14 14:27:19 2015] [error] [client SOME_IP_ADDRESS] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace., referer: SOME_REFERER [Sun Jun 14 14:27:19 2015] [error] [client SOME_IP_ADDRESS] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace., referer: MY_DOMAIN_NAME [Sun Jun 14 14:27:19 2015] [error] [client SOME_IP_ADDRESS] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace., referer: MY_DOMAIN_NAME [Sun Jun 14 14:27:20 2015] [error] [client SOME_IP_ADDRESS] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace., referer: SOME_REFERER [Sun Jun 14 14:27:20 2015] [error] [client SOME_IP_ADDRESS] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace., referer: SOME_REFERER [Sun Jun 14 14:27:20 2015] [error] [client SOME_IP_ADDRESS] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace., referer: MY_DOMAIN_NAME [Sun Jun 14 14:27:20 2015] [error] [client SOME_IP_ADDRESS] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace., referer: MY_DOMAIN_NAME
.htaccess
file inwebroot
. Have you made any changes to that one? Please share it with us. – Mike RockéttRewriteLog
and show its output here. – anubhava