Replace php extension with slash

Hi

I want to replace php extension with a slash

http://localhost/site/login.php

should be

http://localhost/site/login/

I tried

options +FollowSymLinks
RewriteEngine on
RewriteRule ^(.+)/$ $1.php

Its not working

Thanks
Vineet

I copy-pasted your code, but it works for me.

To be clear, rewrite rules don’t change URLs per se. Instead, they enable the alternate, clean version of the URL. The ugly version of the URL will still work.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.