Manually enabling SSI on your server
If you're on a Linux+Apache server that probably supports
SSI but just doesn't have it enabled, you can try manually turning it on
using the magical little file called .htaccess. Simply create an empty txt
file called .htaccess, and add the below to it:
AddType text/html .shtml
AddHandler server-parsed .shtml
Options Indexes FollowSymLinks Includes
Then, upload this file to the root HTML directory of your
server account, enabling SSI across the entire site for any web page with a
.shtml extension. To isolate SSI ability to just a specific sub
directory, upload this file to that directory instead.
Now, assuming this works, you should now make sure your web
host allows you to manually turn on SSI. Some hosts may not like the idea of
you turning on a feature without paying more, so to be safe, you should
check with them first.
Enabling SSI on regular html pages
Now, the above requires that your webpages be named with a
.shtml extension in order for SSI to be enabled for that page. If you're
going to be using SSI across the board, you may want to consider just
turning on SSI for regular .html and .htm pages, so you don't have to rename
your files or follow the .shtml convention. To do this, add the below code
to your .htaccess file:
AddHandler server-parsed .html
AddHandler server-parsed .htm
Viola, SSI should now be enabled for regular HTML pages as
well!
|