Web Hosting Talk







View Full Version : SSI from .htaccess?


yipeedoo
08-28-2001, 03:52 AM
i need to run some .shtml (with SSI) in it... and my server guy says that i can triger the .shtml parsing from .htaccess.... when i asked him how...... well he never replied... but i guess it can be done... please tell me how do i do it...

what do i write in .htaccess to switch on the .shtml parsing...?

Toons
08-28-2001, 04:04 AM
Hi,

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

Should do the trick

You will definatly need the second line, you may possibly need the first one if it hasnt been defined in the apache config.

Regards,

Tony Lucas

yipeedoo
08-28-2001, 05:20 AM
as matter of luck i myself had tried that... but didn't work..... what else cud be it?

sodapopinski
08-28-2001, 05:59 AM
Originally posted by yipeedoo
as matter of luck i myself had tried that... but didn't work..... what else cud be it?

AddType text/x-server-parsed-html .htm .html .shtm .shtml

do not forget to chmod 644 .htaccess

if it's did not work then I guess your server did not allowed their users to configure their own .htaccess file.

EVula
08-28-2001, 04:17 PM
Originally posted by Toons
AddType text/html .shtml
AddHandler server-parsed .shtml


As I recall, you can also add "AddHandler server-parsed .html" to the .htaccess file to get it to read SSI tags in a regular .html file (helpful if you want to implement SSI, but don't want to rename every file). I don't know if this works, as I haven't had a chance to use it yet.

CagedTornado
08-28-2001, 10:52 PM
Ummmm... as far as I know, this needs to be delegated to .htaccess files in the httpd.conf file. (In other words, if you don't have access to httpd.conf, your server admin might have turned it off, and you might not be able to turn it on).

Dan