Mod_rewrite - removing .htm extensions

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. - can just be

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…


See under “No File Extension”

:cool: -//-

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?


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: -//-

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…