Thursday, March 9, 2017

Err_Too Many Redirects laravel

I put my website in a ftp server. But sometimes I get this error:

err_too many redirects

When I clear the cookies fix, but after a time I get the same error. It's strange because happen in random pages. sometimes in the login another in user, is really random.

my routes:

Route::group(['middleware'=>'auth'], function(){

 /*
 * Tela inicial
 */
Route::get('/', 'Usuario\FuncionarioCtrl@index');
Route::get('/home', 'Usuario\FuncionarioCtrl@index');
/*
 * Login sair
 */
Route::get('/login/sair', ['as'=>'login.sair', 'uses'=>'Login\LoginCtrl@sair']);
/*
 *  Paginas principais
 */
Route::resource('admin', 'Admin\AdminCtrl');
Route::resource('ajudas', 'Ajuda\AjudaCtrl');
Route::resource('brindes', 'Brinde\BrindeCtrl');
Route::resource('configuracoes', 'Configuracoes\AppCtrl');
Route::resource('csv', 'Configuracoes\CsvCtrl');
Route::resource('destinos', 'Destino\DestinoCtrl');
Route::resource('funcionarios', 'Usuario\FuncionarioCtrl');
Route::resource('mensagens', 'Mensagem\MensagemCtrl');
Route::resource('midias', 'Multimidia\multimidiaCtrl');
Route::resource('noticias', 'Noticia\NoticiaCtrl');
Route::resource('suportes', 'Suporte\SuporteCtrl');
Route::resource('regulamentos', 'Regulamento\RegulamentoCtrl');
Route::resource('retirar', 'Brinde\Retira_brindeCtrl');
Route::resource('revendas', 'TiposUsuarios\RevendaCtrl');

/*
 * Tipos de usuarios
 */
Route::resource('vendas', 'TiposUsuarios\VendaCtrl');
Route::resource('familias', 'TiposUsuarios\FamiliaCtrl');
Route::resource('outros', 'TiposUsuarios\OutroCtrl');

});

 Route::group(['middleware'=>'guest'], function(){
/*
 * Login
 */
 Route::get('/login', ['as'=>'login.index', 'uses'=>'Login\LoginCtrl@index']);
 Route::get('/login/entrar', ['as'=>'login.entrar', 'uses'=>'Login\LoginCtrl@entrar']);

 });

and my .htaccess in public folder

<IfModule mod_negotiation.c>
    Options -MultiViews
</IfModule>

RewriteEngine On
RewriteBase /

# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]



via Joao Henrique

Advertisement