To remove the .html extension from your urls, you can use the following code in root/htaccess :
1 2 3 4 5 6 |
RewriteEngine on RewriteCond %{THE_REQUEST} /([^.]+)\.html [NC] RewriteRule ^ /%1 [NC,L,R] RewriteCond %{REQUEST_FILENAME}.html -f RewriteRule ^ %{REQUEST_URI}.html [NC,L] |
NOTE: If you want to remove any other extension, for example to remove the .php extension, just replace the html everywhere with php in the code above.