Subscribe to the RSS Feed »

Follow me on Twitter »



Find Programming Jobs

.htaccess oddity

On plain vanilla .htm websites, I typically use server side includes (SSI) to insert repeated elements like navigation and footers. After dropping the include code on the page, normally all I need to do is create a .htaccess file containing:

AddType text/x-server-parsed-html html htm

I just moved a site from one server to another (same hosting provider), and found that while the above worked seamlessly in Internet Explorer, Firefox and Opera would generate a download prompt instead of displaying the .htm pages. The hosting support crew responded with the suggestion of using this in the .htaccess file instead:

AddType text/html .html
AddOutputFilter INCLUDES .htm

Presto, worked like a charm in IE, FF and Op. Anyone know what server configuration caused the need for this different syntax?

Share this: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Sphinn
  • StumbleUpon
  • TwitThis
  • del.icio.us
  • bodytext
  • Technorati
  • Pownce
  • description

Leave a Reply