Today, the story is that there is a Laravel Project setup in ISP Config Hosting, where the default directory data for each client is in /web then index.php is directly indexed, but these Apps are in the /public folder.
key : Error “Request exceeded the limit of 10 internal redirects”
I tried googling, and found it on one of the stackoverflow, then I applied it in htaccess. Here is the code:
RewriteEngine On
# Rewrite static resources
RewriteCond %{DOCUMENT_ROOT}/myProjectDir/public/$1 -f
RewriteRule (.+) myProjectDir/public/$1 [L]
# Rewrite everything else to the "public" directory
RewriteRule .* myProjectDir/public/ [L]
In my project, Laravel‘s data directory is in the “demo” folder, as shown in the image below.
But unfortunately, an error occurred.
[Wed Oct 13 11:56:18.516039 2021] [core:error] [pid 10603:tid 139759234017024] [client 10.200.30.151:51057] AH00124: 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.
[Wed Oct 13 11:56:18.516039 2021] [core:error] [pid 10603:tid 139759234017024] [client 10.200.30.151:51057] AH00124: 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.
[Wed Oct 13 11:56:18.516039 2021] [core:error] [pid 10603:tid 139759234017024] [client 10.200.30.151:51057] AH00124: 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.
[Wed Oct 13 11:56:18.516039 2021] [core:error] [pid 10603:tid 139759234017024] [client 10.200.30.151:51057] AH00124: 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.
[Wed Oct 13 11:56:18.516039 2021] [core:error] [pid 10603:tid 139759234017024] [client 10.200.30.151:51057] AH00124: 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.
[Wed Oct 13 11:56:18.516039 2021] [core:error] [pid 10603:tid 139759234017024] [client 10.200.30.151:51057] AH00124: 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.
[Wed Oct 13 11:56:18.516039 2021] [core:error] [pid 10603:tid 139759234017024] [client 10.200.30.151:51057] AH00124: 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.
And then googling again about “Request exceeded the limit of 10 internal redirects”, finally found this article.
See Also: Ispconfig Nginx Directives Laravel
I tried to apply it in my laravel project’s htaccess and it was solved. Here is my code.
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/myprojectDir/public/
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ /myProjectDir/public/$1
#RewriteRule ^ index.php [L]
RewriteRule ^(/)?$ myProjectDir/public/index.php [L]
Ok, the problem is solved.