The request has exceeded the limit of 10 internal redirects -.htaccess

I get the following error message in my Apache log after cloning a git repo on our dev server;

The request has exceeded the limit of 10 internal redirects due to a probable configuration error. Use 'LimitInternalRecursion' to increase if necessary. Use the "LogLevel debug" to get the backtrace.

2x.htaccess copied below;

Webroot.htaccess (located in projectRoot / webroot /)

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /apply/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ index.php [L]
</IfModule>

.Htaccess application (located in projectRoot /)

<IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteBase /apply/
    RewriteRule    ^$    webroot/    [L]
    RewriteRule    (.*) webroot/$1    [L]
</IfModule>

Other answers say change RewriteBaseto /, but for me this is not an option since I need it to be /apply/. Several other answers indicated a problem RewriteRule, however, removing these problems does not solve the problem.

+4
1

, :

<IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteBase /apply/
    RewriteRule ^$ webroot/ [L]
    RewriteCond %{REQUEST_URI} !^/webroot/
    RewriteRule    (.*) webroot/$1    [L]
</IfModule>

, /webroot/ (. *)

+2

Source: https://habr.com/ru/post/1629179/


All Articles