views:

27

answers:

1

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.

A: 

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.

KrNel