Laravel sends a server for 10 redirects?

Receive error message:

[Sun Jun 02 12:43:33.579095 2013] [core:error] [pid 4964:tid 808] [client 127.0.0.1:56964] 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 

When trying to use laravel for routing. My routes are as follows:

 Route::get('/', ' HomeController@showWelcome '); Route::get('history', ' HistoryController@showHistory '); 

And my .htaccess:

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

And my alias:

 Alias /wunhopkuendo/ "c:/wamp/www/wunhopkuendo/public/" <Directory "c:/wamp/www/wunhopkuendo/public/"> Options Indexes FollowSymLinks MultiViews AllowOverride all Order allow,deny Allow from all </Directory> 
+6
source share
2 answers

I also had this problem, and I solved it with the following line:

 RewriteBase / 
+17
source

If you use Laravel in a subfolder, you need to follow these steps:

* Note that you are using WAMP in the default installation directory (c: \ wamp)

Paste the RewriteBase line into your .htaccess file with a subfolder of your Laravel installation.

<IfModule mod_rewrite.c>
Parameters -Multiprocessors
Rewriteengine on
Rewritebase / subfolder
RewriteCond% {REQUEST_FILENAME}! -f
RewriteRule ^ index.php [L]
<IfModule>

Set the application URL in c: \ wamp \ www \ subfolder \ config \ app.php

'url' => 'hggp: // localhost / subfolder',

Create a configuration file in the alias directory c: \ wamp \ alias \ subfolder.conf with this content:

Alias โ€‹โ€‹/ subfolder "c: / wamp / www / testando / public"

<C: / wamp / www / subfolder / public reference> Index parameters for FollowSymLinks MultiViews
AllowOverride all
Allow from all </ Directory>

It works!:)

+10
source

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


All Articles