All .htacces and mod_rewrite answered - examples, tips and tricks Forum Index  

All .htacces and mod_rewrite answered - examples, tips and tricks Forum Index -> Other technologies (SSI, CGI...) -> Enabling SSI
Author Message
admin
Site Admin


Joined: 18 Jul 2006
Posts: 89

PostPosted: Tue Jul 18, 2006 7:19 am    

Enabling SSI

Reply with quote

If you want to use SSI, but can't do so with your current Web host, you can change that with .htaccess file. The following lines tell the server that any file named .shtml should be parsed for server side commands...
Code:
AddType text/html .shtml
AddHandler server-parsed .shtml
Options Indexes FollowSymLinks Includes

If you don't care about the performance hit of having all .html files parsed for SSI, change the second line to...
Code:
AddHandler server-parsed .shtml .html

If you're going to keep SSI pages with the extension of .shtml, and you want to use SSI on your index pages, you need to add the following line to your .htaccess file...
Code:
DirectoryIndex index.shtml index.html

This allows a page named index.shtml to be your default page, and if that isn't found, index.html is loaded.
Back to top
Display posts from previous:   
Post new topic   This topic is locked: you cannot edit posts or make replies.   
View previous topic
View next topic
All .htacces and mod_rewrite answered - examples, tips and tricks Forum Index
Page 1 of 1
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
FreeMind 1.1 Template by AU Templates