How do you remove the .html in the website url. For example http://example.com/webpage.html. Most websites that I see don't have the .html extension on their webpages so I was wondering how I can do it for my website. Thanks, Jordan
to deploy extensionless URLs: 1) Edit your pages (or your page-generation script) to link to extensionless URLs 2) Add mod_rewrite code to internally rewrite those URLs, when requested from your server, to the correct-extension file. 3) Optional: Detect client requests for URLs with extensions, and externally redirect those to the extensionless URL. the purpose of this is to 'recover' old backlinks and user bookmarks, and to speed up the switchover to your extensionless URLs in search engine results. So basically, you're trying to do step 3 here without doing the other two steps. This will result in your visitors having to go through the added delay of an external redirect for every extensionless page request, and complicate the search engines' job of indexing those pages.
If the webpage.html is your main page, then change its' name to index.html, then when you just got to example.com it will come up without any page extension.
An easier way than using the complicated MOD_REWRITE method is to simply save and organise your work into folders. For example, if you have a page called 'contact.php' and you would prefer 'contact/' instead, simply create a sub folder, and save the file inside as index.php.
There is not much point in rewriting the URL's just to change to file extension, it's not better for seo.