Назад | Перейти на главную страницу

Достигнут предел внутреннего перенаправления Apache

У меня следующая проблема:

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.

Apache пытается связаться с несуществующими файлами.

Это мой .htaccess:

RewriteEngine  on

Options +FollowSymlinks    

RewriteCond %{HTTP_HOST} ^(www.)?domain.com$   

RewriteCond %{REQUEST_URI} !^/subfolder/$   

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^(.*)$ /subfolder/$1   

RewriteRule ^\??$ index.php [L]

Я включил логи, и в журналах было что-то вроде:

/nonexistingfile -> /subfolder/nonexistingfile
/subfolder/nonexistingfile -> subfodler/subfolder/nonexistingfile 
/subfodler/subfolder/nonexistingfile -> subfodler/subfodler/subfolder/nonexistingfile

И так 10 раз.

Добавить [L] в строку, в которую вы переписываете подпапку.