2015-05-16, 10:46 PM
I am currently trying to remove .php from my urls. I have found success with this code except it is killing my login. Basically once in place it does not allow me to login. I get the login popup but I get redirected as if the cookie does not set. Can anyone help with this of perhaps a different way of removing .php from my links.
Options +FollowSymLinks -MultiViews
# Turn mod_rewrite on
RewriteEngine On
RewriteBase /
## hide .php extension snippet
# To externally redirect /dir/foo.php to /dir/foo
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s([^.]+)\.php [NC]
RewriteRule ^ %1 [R,L]
# To internally forward /dir/foo to /dir/foo.php
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^(.*?)/?$ $1.php [L]