.htaccess rewrite rule: i cant access folders, only php files
RewriteEngine On
RewriteRule ^([^\.]+)$ $1.php [QSA]
Well this is meant to remove the php extension and to find /login and match it with /login.php for example
It is working fine, but when i need t开发者_运维百科o enter a folder /something it tries to match it with /something.php so i get a 404 error.
How can I make this rule to let me accesss folders too?
thanks in advance
Try this:
RewriteRule ^login(/?|/.*)$ /login.php [QSA]
精彩评论