.htaccess url rewriting /project/Login to /project/public/index.php/Login without redirecting URL
I have this .htaccess code that works perfectly:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule !\.(js|ico|txt|gif|jpg|png|css)$ public/index开发者_运维技巧.php [QSA,L]
</IfModule>
...but this code redirects to public sub directory. I don't know if it's possible to rewrite url without redirecting, just use /project/Login
appointing to /project/public/index.php/Login
.
RewriteRule project/Login$ project/public/Login [L]
Have you tired something like that? Your second link doesn't seem right "/project/public/index.php/Login", you shouldn't specify 'index.php' followed by another folder unless you have a RewriteRule that can handle it, otherwise the page doesn't exist on your server.
'/project/public/index.php?Login' (same as '/project/public/?Login') would be valid though, having the query string accessible as $_GET['Login'].
Hope this helps.
精彩评论