<?php echo "This is the Login Page"; ?> <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>How to Remove .html and .php Extension in the URL using .htaccess</title> </head> <body> <a href="index">Home</a> </body> </html>
<IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}.php -f RewriteRule ^(.*)$ $1.php #RewriteRule ^([a-z]+)\/?$ $1.php [NC] RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}.html -f RewriteRule ^(.*)$ $1.html #RewriteRule ^([a-z]+)\/?$ $1.html [NC] </IfModule>