1

While entering my website via the main page (example.com) everything works fine. But when entering in example.com/forums I get a 500 Internal Error, and I see in the error_log it says the following:

Request exceeded the limit of 10 internal redirects due to probable configuration error.

Also, I know I can post the output of httpd -S, but it is really long and there are no spoiler blocks & and the formatting goes away, sorry.

This is my .htaccess:

<IfModule mod_rewrite.c>
 RewriteEngine On
 RewriteCond %{REQUEST_FILENAME} -f [OR]
 RewriteCond %{REQUEST_FILENAME} -l [OR]
 RewriteCond %{REQUEST_FILENAME} -d
 RewriteRule ^.*$ - [NC,L]
 RewriteRule ^(data|js|styles|install) - [NC,L]
 RewriteRule ^.*$ index.php [NC,L]
 RewriteBase /var/www/html
</IfModule>

EDIT: Do you need the virtualhost?

<IfModule mod_rewrite.c>
    RewriteCond %{HTTPS} !=on
    RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
    RewriteRule ^ http://%1%{REQUEST_URI} [R=301,L]
</IfModule>

1 Answers1

0

One issue here is that your RewriteRule matches every request, and rewrites it to index.php. So, a request to index.php gets rewritten also to index.php, ad infinitum. Except that Apache stops trying after detecting ten consecutive redirects.

You need to find out what exactly you want to rewrite, and then make a rule for that which does not loop back to itself.

Tero Kilkanen
  • 38,887