Laravel 4 admin route same as admin folder -


i have /admin folder , cant delete becaus there old files linked externaly , need use /admin route. when use /admin route have loop, if rename admin folder, works, cant permanently. if use route /admin/anything, works.

how can have folder , route work together.

here routes:

route::post('admin/login/valida', ['before' => 'csrf', 'uses' => 'logincontroller@getvalidar']); route::get('admin/login', 'admincontroller@login'); route::get('admin/asociarmenuarchivo', 'admincontroller@asociarmenuarchivo'); route::get('admin/disenosnuevos', 'admincontroller@disenosnuevos'); route::get('admin/disenosnuevooantiguo', 'admincontroller@switchdisenos'); route::get('/admin', 'admincontroller@getindex'); 

the last 1 route doesnt work.

here .htaccess:

<ifmodule mod_rewrite.c>     <ifmodule mod_negotiation.c>         options -multiviews     </ifmodule>      rewriteengine on     rewritebase /      # redirect trailing slashes...     rewriterule ^(.*)/$ /$1 [l,r=301]      # handle front controller...     # rewritecond %{request_filename} !-d     rewritecond %{request_filename} !-f      rewritecond   %{request_uri}  !/cm/.*     #rewritecond   %{request_uri}  !/admin/.*     rewritecond   %{request_uri}  !/correo/.*      rewriterule !^/?admin index.php [l,qsa]      rewriterule ^ index.php [l]     errordocument 401 "unauthorised" </ifmodule> 

the problem slash rewrite, solution was:

rewritecond   %{request_uri}  !/admin/.* rewriterule ^(.*)/$ /$1 [l,r=301] 

Comments

Popular posts from this blog

javascript - how to protect a flash video from refresh? -

visual studio 2010 - Connect to informix database windows form application -

android - Associate same looper with different threads -