Support the ongoing development of Laravel.io →
posted 10 years ago
Security

Hi guys again,

in my routes.php i have all my routes declared on my local machine my filters work like a charm but if i use them on production server it always gives me an error: there are to many redirects?? what does it mean ?

Routes.php


Route::group(array('before' => 'guest'), function () { // without this filter everything works except the redirect?
   Route::group(array('before' => 'csrf'), function () {
 // here are the routes declared but i can't enter them ?
  route::post ....
   });
    Route::get('/', array('as' => '/', 'uses' => 'RoutesController@get_index'));
    Route::get('library', array('as' => 'library', 'uses' => 'RoutesController@get_library'));
});

filters.php


Route::filter('guest', function()
{
	if (Auth::check()) return Redirect::to('/');
});

i hope you understand my problem

best regards

Last updated 3 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

SmokeTm smoketm Joined 29 Jan 2015

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.