Forum Moderators: phranque
When I add the following to the .htaccess
(to force .html pages to be parsed like .shtml pages):
AddHandler server-parsed .html
...then the Internet Explorer forces me to download/save as the .html pages to my harddisk when I go to the page url through IE. The downloaded copy shows that the SSI has been successfully run.
Is this the problem/setting of my browser or is something wrong
with the .htaccess?
Sounds like the MIME type may be wrong - Otherwise, the browser should have no idea that SSI is being used on the server side, and you should see no difference in browser behaviour.
I'd recommend checking the headers [webmasterworld.com] your server is sending along with the page -- compare them between the non-SSI case and the SSI case and see what the difference is.
The Apache mod_include documentation [httpd.apache.org] shows that AddType may be needed in addition to AddHandler. If that does not work, you can always use the XBitHack directive, also documented in mod_include.
Jim
The headers checking was very useful and revealed me that the final file sent to IE was .php hence the "open/save as" dialog box.
The problem lied in my .htacces where I also tried to force .html files to be parsed as .php
The right order which lets the .html files to be treated as .php and also .shtml is:
AddType application/x-httpd-php .html
AddType text/html .html
AddHandler server-parsed .html