♦View your IP Address: (none)♦Members♦Help♦Bookmark♦NewHOT♦110mb♦Alexa Ranking♦
♦Study♦InfoTech♦Security♦Entertainment♦Tourism♦Career♦Social♦Business♦Science♦
♦California-USA: ♦
Enable SSI On Your Server via .htaccess file
Products / Services
In order to use Server Side Includes, your server must be configured to support them. First, check that your server support them and if you are not allowed to do SSI - consider moving to someplace where you can! But there are ways to still make it possible. Find out how below!
This guide demonstrates how to enable SSI on your server using .htaccess
If you are paying for hosting services, you may need to get permission from your host to make sure you are not violating their Terms of Service which could result in you getting the boot! Every decent host supports SSI but double-check to make sure.
To enable SSI either create a file simple called .htaccess or edit your existing .htaccess file and place the following code in it:
First Solution:
AddType text/html .shtml
AddHandler server-parsed .shtml
Options Indexes FollowSymLinks Includes
Note: to enable SSI for your full web site place the .htaccess in the root directory of your site; to enable it for just a certain directory place the .htaccess file only in that particular directory.
The first line of the code above tell the server that .shtml extension is a valid extension. The second line add a handler to all pages with the .shtml extension which tell the server to parse (process) the document for server side includes.
If you prefer you can use a different file extension for your files which you want parsed for server side includes. Simply change the .shtml to .shtm, etc. If you also want your .htm documents parsed by the server (so you don't need to rename all your files) simply add the following after the first line of the code above:
AddHandler server-parsed .htm
Second Solution:
AddType text/x-server-parsed-html .shtml .shtm .htm .html
Next, make another text file (you can again use Notepad). The text file can include HTML, javascript, music, whatever you want to show up on a large number of pages. After you've made the text file, save it with the .txt file extension, name it anything you want but it must have the .txt extension.
Add this code on all your pages where you want the text file to appear. Change the "yourfilename" to reflect what you named the text file.
<!--#include file="yourfilename.txt" -->
Upload the .htaccess file, text file and your altered pages to your server.
If you want to use SSI in your default directory page, such as index.shtml you may (but normally won't) need to add the following to the .htaccess file:
DirectoryIndex index.shtml index.htm
This means that index.shtml can be your default page. If this page did not found, the server will look for index.htm
View more...- Introduction to Server Side Includes (SSI).
- Enable SSI On Your Server via .htaccess file.
- Include Command of SSI.
- Echo Command of SSI.
- Date Command of SSI.
- Config Command of SSI.
- Exec Command of SSI.
- Other Basic Commands of SSI.
- SSI Conditional Basics.
- Conditional Expressions of SSI.
- Choose colors for your website.
- 10 Reasons Why People Don't Visit Your Web Site.
- 10 Profitable Reasons To Add A Discussion Board Or Chat Room To Your Web Site.
- 10 Legal Commandments for Your website.
- A sample for comments include Google Search results on Web, Videos, Blogs.
- Add Favicon to further promote your website.
- Website Design and content, technical guidelines and basic principles.
- List of common MIME types and their corresponding file extensions.
- What is a RSS Feed ? How to make Static Feeds and Dynamic Feeds.
- Resources design website for webmasters.
♦Email to your friend ♦Email to us ♦Get updates by Email ♦View updates on Web ♦Follow us on Twitter ♦Google Safe Browsing ♦McAfee SiteAdvisor ♦Diagnostic this page ♦Noreton SafeWeb ♦DrWeb ♦Technorati Links ♦Save to del.icio.us ♦Add to del.icio.us ♦Digg This! ♦Share on Facebook ♦outside.in: geotag this story ♦Discuss on Newsvine ♦Stumble It! ♦Add to Mixx!♦
If you would like to submit your website for FREE or advertise your own webpage(s) on our webpages, please enter Terms of Service webpage to send your request. Thank you!