Forum Moderators: phranque

Message Too Old, No Replies

Server Side Includes

.shtml

         

malcolmcroucher

12:11 pm on Nov 22, 2007 (gmt 0)

10+ Year Member



If i add

Addhandler .html to my conf file

will i be able to add an ssi to my html file or will it only parse the html file?

Regards

Malcolm

jdMorgan

12:39 pm on Nov 22, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It would do neither. You'd probably get a server error because the handler name is missing.

If you add


AddHandler server-parsed .html

Then all .html files on your server will be parsed ("scanned") for Server Side Includes, and they will be processed.

The problem with this approach is that *all* .html files will be parsed; This increases your server load somewhat, although it's not such a problem with modern, fast machines. However, if only a few of your .html files will contain SSI, you might consider using XBitHack (see mod_includes) which uses the files' "eXecute" bit to determine whether to parse .html files for SSI.

Another alternative if only specific .html files are to be parsed for SSI is to enclose the above AddHandler directive in a <Files>, <Directory>, or <Location> container (or the "Match" variants of these containers) so that SSI parsing is only enabled under limited circumstances.

Jim