Whenever I try logging into my site with a wrong user details, I get redirected from www.example.com/
to www.example.com/index.php
.
I would like to remove index.php
from my link.
Here is the content of my htaccess
file, which does not work for me.
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php [NC,L]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /.*\.php\ HTTP/
RewriteRule ^(.*)\.php$ /$1 [R=301,L]
RewriteRule ^login index.php [NC,L]