r/web_programming • u/RedBlimp • Jun 15 '16
Removing the .html extension
So I've done a little research myself and everything points to the fact that I need to create a .htaccess file. I've created it, named it, and put it in the folder with the other .html pages but it's not working. Here is what is in the file.
Options +MultiViews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule [^.]+$ $1.php [NC,L]
RewriteRule [^.]+$ $1.html [NC,L]
Any ideas? I'm a super novice in this stuff.
4
Upvotes
1
u/adrian_the_developer Jun 16 '16
Try calling it either index.html or index.php.