user1797484
user1797484

Reputation: 758

Laravel sends the server on 10 redirects?

Getting 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 to do 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>

Upvotes: 14

Views: 14274

Answers (4)

Tenzin Lodoue
Tenzin Lodoue

Reputation: 1

In my case the .htaccess in public folder was missing because of that it was throwing this redirect error. Make sure that your "public/.htaccess" file is available. Hope its helps.

Upvotes: 0

Rodrigo Saraiva
Rodrigo Saraiva

Reputation: 481

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

Assuming that you use WAMP with the default installation directory (i.e. c:\wamp)

Insert the RewriteBase line in your .htaccess file with the subfolder of your Laravel instalation.

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

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

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

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

Alias /subfolder "c:/wamp/www/testando/public"

<Directory "c:/wamp/www/subfolder/public">
    Options Indexes FollowSymLinks MultiViews
    AllowOverride all
    Allow from all
</Directory>

Upvotes: 16

Pato Mbugua
Pato Mbugua

Reputation: 85

Check if your public folder is setup properly

Upvotes: 0

Sam Texas
Sam Texas

Reputation: 1275

I had this problem as well, and I solved it with the following line on the .htaccess file:

RewriteBase /

Upvotes: 37

Related Questions