Hiding Extensions from URLs
Once I had finished getting the MIME type modified on-the-fly, I remembered Tim Berners-Lee’s description of Cool URIs, advising authors to leave out tons of things from URIs, including file extensions. So I added the following to the .htaccess file in the root of my Web server:
options +multiviews
AddType application/xhtml+xml;charset=utf-8 .xhtml; qs=1.0
AddType text/html;charset=utf-8 .html; qs=0.9
AddType image/mng; .png qs=0.95
AddType image/png; .png qs=0.90
AddType image/gif; .png qs=0.85
This also allows you to do a poor-man’s immitation of the fallback that nested <object> tags are supposed to provide, but don’t because IE shows ’em all, not just the first one that renders.