Error Pages: The 404 Experience
Automatically move browsers from .html pages to .shtml pages
The scripts are pretty simple just put one or the other at the head of the HTML page, in between the the HEAD tags. To see the first script in action, try this link, which points to a ".html" version of this page. After the script runs you should end up back at this page with the correct ".shtml" extension. This script could be put on an 404 error response page.