Enabling SSL using .htaccess
The short form of Server Side Includes is SSI. It is a scripting language that’s lightweight and its primary use it to embed HTML documents to other HTML documents. SSI is the HTML tags that you can add in the HTML documents for calling other content in HTML or CGI scripts.
For Example, it’s particularly useful to add navigation menu at the HTML documents, allowing you for using single document to show navigation menu at rest of the other documents. It not only saves the space in the disk but also saves you effort as you only need to modify a single file for content updation. SSI makes it easy to re-use the commonly used elements such as menus, sidebars, headers and footers on a website.
Here are two HTML tags examples that you will be using for calling the SSI documents. Place them in the HTML document:
Through the above code, CGI script which is ‘script.cgi’ would get loaded that is there in the directory ‘cgi-bin’.
The above code will call ‘document.html’ (HTML Document) there in the directory ‘files’. It’s important that you a relative URL to be used and not a full URL or a path.
It’s most likely that SSI would function properly on the web server, but rather than ‘.html’ you might need using the file extension ‘shtml’. This may be frustrating for you if your website set up is already using ‘.html’ extensions. In such a case, enable the SSI and follow the below instructions.
Make a .htaccess file by abiding the guidance and the main instruction that include the text below.
AddHandler server-parsed .html
Lines above will instruct Apache Web Server for permitting SSI with ‘.html’ file extension in documents.
If you need SSI to be enabled for more than one file extensions, you need to make an .htaccess file by following the guidance and main instructions that includes the text below.
AddHandler server-parsed .html AddHandler server-parsed .shtml AddHandler server-parsed .htm
Lines above will instruct Apache Web Server for allowing SSI with file extension ‘.htm’, ‘.html’, ‘.shtml’.