I trying to remove the .php from the URL and it's working fine. But when i log out and trying to log in from front page i get error from wrong user or password. But from admin i can log in. What is wrong with this code. I found it on some site.
RewriteBase /
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s([^.]+)\.php [NC]
RewriteRule ^ %1 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^(.*?)/?$ $1.php [NC,L]