Removing all file extensions from URLs


#1

I do understand that this has been posted on this forum before and I apologize for asking again but I just can’t seem to figure it out for some reason. I have a very basic website with only two different HTML pages - http://dulinauto.com/index.html and http://dulinauto.com/feedback.html. How would I go about removing the “.html” off the ends of both of these URLs? I need to make sure that when a customer tries to go straight to http://dulinauto.com/feedback they will not get a blank page. Thanks so much.


#2

You can do this via an .htaccess file. I forget the exact parameters, but can Google it.


#3

As an alternative suggestion, I tend to avoid using .htaccess whenever avoiding it seems simpler. And it’s simpler (I think) in this situation to just put your two pages at:

dulinauto.com/index.html
dulinauto.com/feedback/index.html

Then a browser request of the form http://dulinauto.com ( or http://dulinauto.com/ ) would return the first page, and a browser request of the form http://dulinauto.com/feedback ( or http://dulinauto.com/feedback/ ) would return the second page.


#4

.htaccess exists for a reason, though, and you can do all sorts of neat tricks with it: