Forum Moderators: coopster & phranque

Message Too Old, No Replies

is it possible to use SSI tags in an .html page?

         

mack

9:11 pm on Nov 23, 2002 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



When using SSI is is possible to have the page retain it's .html or .htm file extension?

as opposed to renaming to .shtm or .shtlm

jatar_k

9:15 pm on Nov 23, 2002 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Yes, but you have to set that up in .htaccess.

I believe it is addhandler? either of these may help.

httpd.apache.org/docs/howto/htaccess.html
httpd.apache.org/docs/mod/mod_mime.html#addhandler

jatar_k

9:27 pm on Nov 23, 2002 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



I just did a quick search on the apache site for "htaccess addhandler" so there may be better pages than those.

msr986

9:30 pm on Nov 23, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Another method is to use the XBitHack directive in the .htaccess file. Then you can selectively make an html file run SSI by setting it's permissions to 755.

[httpd.apache.org...]

dingman

9:33 pm on Nov 23, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Xbithack is deffinitely a better way to go if you aren't in fact using SSI on every single page, since it saves the server from having to process every page served for SSI directives. Of course, if you are using it on every page, there's no harm in just using addhandler.

jdMorgan

10:43 pm on Nov 23, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Using "XBitHack Full" also allows you to keep your SSI- and Script-containing html pages cacheable if you set both the Owner-eXecute and Group-eXecute bits. This tells Apache to return the last-modified date of the including html page as the last-modified date for the whole page-plus-included-files bundle, thus making it cacheable.

Jim

mack

10:47 pm on Nov 23, 2002 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



WOW this is a lot more technichal then I though. I sure have some reading to do.

PS 1000th post :)

Brett_Tabke

11:10 pm on Nov 23, 2002 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



In .htaccess add:


AddType text/html .htm
AddHandler server-parsed .htm

switch .htm to your fav extension.

mack

12:21 am on Nov 24, 2002 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Excelent Brett, that worked perfectly

Thanks very much. :)