php - Laravel htaccess redirects in wrong way -
thanks in advance.
i using laravel 5 , want fixes in .htaccess file.
here .htaccess file.
<ifmodule mod_rewrite.c> <ifmodule mod_negotiation.c> options -multiviews </ifmodule> rewriteengine on # redirect trailing slashes if not folder... rewritecond %{request_filename} !-d rewriterule ^(.*)/$ /$1 [l,r=301] # handle front controller... rewritecond %{request_filename} !-d rewritecond %{request_filename} !-f rewriterule ^ index.php [l] </ifmodule> the problem when adding slash after url throwing me @ root of www folder. there possible solution
http://localhost/project/public/index.php --works fine. http://localhost/project/public/index.php/ --redirecting me http://localhost/index.php
anyhow need redirect http://localhost/project/public/index.php
any appreciated.
finally got perfect solution.
rewritecond %{request_filename} !-d #rewriterule ^(.*)/$ /$1 [l,r=301] // have replaced '/' , worked. rewriterule ^(.*)/$ $1 [l,r=301]
Comments
Post a Comment