.htaccess file? I have 100s of .htm and 100s of .html files in my root folder, but I need an .htaccess snippet (I'm new to .htaccess) so that we can drop those file extensions. Need code snippet for .htaccess to drop the .htm and .html.
Bill- I don't know what mime types are. I just want, like everyone, NOT to have to always include the ".htm and ".html" when I send customers links or when I/they have to type in the URL. It's old-fashioned to me. Simplicity is beauty. Less is more. The web editor I use adds those. I understand that there are several methods to do this in .htaccess.
For example, I have the following code in my .htaccess (today), but none of them are working (still have to include the extensions). Take a look at the code if you like: (There's a few versions and I know some are redundant). Like I said, I'm new with .htaccess. Maybe you could clean it up for me if you see fit, thanks:
# DROP .HTM EXTENSIONS
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.htm [NC,L]
# DROP .HTML EXTENSIONS
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.html [NC,L]
# ANOTHER WAY TO DROP .HTM EXTENSIONS
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
Bill- I don't know what mime types are. I just want, like everyone, NOT to have to always include the ".htm and ".html" when I send customers links or when I/they have to type in the URL. It's old-fashioned to me. Simplicity is beauty. Less is more. The web editor I use adds those. I understand that there are several methods to do this in .htaccess.
For example, I have the following code in my .htaccess (today), but none of them are working (still have to include the extensions). Take a look at the code if you like: (There's a few versions and I know some are redundant). Like I said, I'm new with .htaccess. Maybe you could clean it up for me if you see fit, thanks:
# DROP .HTM EXTENSIONS
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.htm [NC,L]
# DROP .HTML EXTENSIONS
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.html [NC,L]
# ANOTHER WAY TO DROP .HTM EXTENSIONS
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d