htaccess settings for SSI

Web hosting discussion, programming, and shared and dedicated servers.
4 posts Page 1 of 1
by csr-inc » Tue Apr 15, 2014 10:16 am
Migrated a site from another provider. Previously, I setup my .htaccess file to allow for server side includes on the site as per the example here: http://httpd.apache.org/docs/2.2/howto/ssi.html. When I include the .htaccess file I get an Apache 500 error. Does sonic still support server side includes, and if so, how does one go about enabling them?
by cdkeen » Wed Apr 16, 2014 12:18 pm
Yes. I fixed this for you by only including these lines in the htaccess file:
Options +Includes
XBitHack On
Then I set x bit on the directory's .htm files. Please let me know if you need any additional assistance, I am happy to help! Thanks for choosing Sonic.net!
cdkeen - Sonic.net System Operations
by csr-inc » Mon Apr 21, 2014 10:54 am
Still not working. On the individual pages, I'm using <!--#include virtual="/pageIwantToInclude.shtm" -->. The .htaccess file you included didn't use .shtm so I added them, the contents are still not included. I tried changing them to .shtml, and they still don't include on the pages. I setup an index.SSI.htm example page that should include a footer and a left hand navigation bar, but they don't get included.
by cdkeen » Mon Apr 21, 2014 11:52 am
Sorry but I see that the contents are being included: I viewed the page source from the webserver and also at the webroot and I can confirm that your footer and navigation information is being included as called on indexSSI.htm.

Also a note: In the .htaccess file the two bottom lines are commented out (begin with #) which means they are not actively being read (and do not need to be as the XBitHack line above is active).

If you are still having difficulties, please let me know and be as specific as you can so that I can assist you.
cdkeen - Sonic.net System Operations
4 posts Page 1 of 1