Mod_rewrite - removing .htm extensions


#1

Hey there… this is my first time posting on here, so I hope I’m following the proper protocol (if I’m not, please let me know)…

So, I’m wanting to set up an .htaccess file such that the .htm extensions on certain webpages can be dropped. I.e. - www.xxxx.com/freestuff.htm can just be www.xxxx.com/freestuff

I’ve seen the topic covered in a million places online, but honestly, I’m a complete novice at this. Until yesterday, I didn’t know what an .htaccess file even was (or Apache/mod_rewrite for that matter), so yeah… not sure I’m gonna be figuring this out on my own. :slight_smile:

Any help anyone can provide would be awesome. Thanks…

Gavin


#2

See http://wiki.dreamhost.com/Htaccess_tricks under “No File Extension”

:cool: openvein.org -//-


#3

Thanks for the info, Atropos7. I tried copying/pasting the code into a text file (named .htaccess), uploading to the root directory, removing the .txt from the file, and testing it on one of the pages… still gives me the Error 404 page. Any thoughts?

Gavin


#4

Don’t copy and paste. Read the documentation at Module mod_rewrite URL Rewriting Engine and modify it so it works for your situation. The documentation covers almost everything you need to know so all you have to do is look up stuff from the example and see what the documentation says it does.

:cool: openvein.org -//-


#5

Thanks, Atropos7. I’ll definitely check that out and go through it line by line. Post back here if I have any questions.

Thanks again…