My .htaccess file currently has -
RewriteEngine On
# remove .php
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^(.+)/?$ $1.php [L]
# remove .html
RewriteCond %{REQUEST_FILENAME}.html -f
RewriteRule ^(.+)/?$ $1.html [L]
Since I have two files (login.html and login.php), when I do /login, it automatically goes to the php.
In a javascript file, I have it redirecting to /login, but I need it to redirect to login.html, not login.php. How do I do that without doing /login.html
because I still want to hide the extensions from the website url. Similarly, how would I redirect to either sites without the extensions? Is it possible or do I need to create different names for them.