Setting Up SSI on Wamp server on windows
How to add SSI ( Serverside include support in WAMPSERVER )?
Server Side Includes (SSI) – Definition
The Server Side Includes is a simple interpreted server side scripting used in HTML pages to make it more responsive web pages on web server. It is used in big websites which most parts are repetitive. SSI enables the HTML pages to add one or more files into a web page and come out with given directives. The SSI makes easy to maintain the site. For instance: If any website have numerous HTML pages with dynamic contents and each time only contents need to be change, the SSI works here. It has some commonly used code that can be re-used many times in a website.
Open http.conf file from C:\wamp\bin\apache\Apache2.2.11\conf :
Then add the following code:
AddType text/html .html
AddOutputFilter INCLUDES .html
The above code should be above “<Directory />” in httpd.conf file
Then find “Options Indexes FollowSymLinks” and replace it with:
Options +Indexes +FollowSymLinks +Includes
Restart wamp services and enjoy.
Add Handler on Apacher Sever hosting company
On a hoster company, add in your .htaccess the first line to activate SSI handler process :
AddHandler server-parsed .html ErrorDocument 404 /410.php
How to use it :
Now you can use incude calls for .html pages as decided :
SHTML or ASP: <!–#include virtual=”/path_relative_to_site” –>
PHP: <?php include(“../path_relative_to_document“) ?>
The above code will work as a SSI enable web page and return with the given direction on the browser.