Am already transparently redirecting requests for /file to /file.php -- accessing /file shows /file.php. My .htaccess:
RewriteEngine on
RewriteBase /
RewriteRule ^([a-zA-Z]+)/?$ $1.php [L]
Would now like to do a hard redirect for /file.php to /file -- if I hit up /file.php, URL in the address bar must show /file. Tried the following but didn't work:
RewriteEngine on
RewriteBase /
RewriteRule ^([a-zA-Z]+)\.php$ $1 [R]
RewriteRule ^([a-zA-Z]+)/?$ $1.php [L]
Any help?