When using .htaccess to redefine the URLs for a site, there are two clear options:
- Provide no extension, as StackOverflow has done with URLs like
http://stackoverflow.com/questions/ask - Provide the extension of .html, regardless of the underlying technology, so something like
http://stackoverflow.com/questions/ask.html
Are there any specific advantages to using one approach over the other?
Edit: Here is the article that made me consider using .html to fake a static implementation.
The first URL can be considered as a generic URL in contrast to the second URL that can be considered as a specific URL (specifying HTML as the content type).
Generic URLs are useful when using content negotiation. So
/questions/askcan be used to request a resource that depends on client’s preferences (e.g. Accept, Accept-Encoding, and Accept-Language), location (localization), and time. On the other hand/questions/ask.htmlwould be used to request a resource that is definitely HTML.