elfshadowreaper elfshadowreaper - 7 months ago 20
HTML Question

server-side include won't work on godaddy

I'm trying to get a server-side include to work on my new godaddy (linux server) site but for the life of me I can't get it to even see the ssi code. I checked with godaddy and they said the site was set up to take ssi without me having to do anything. The home.html and file.html are in the same directory(public_html). I've even tried to do a basic website with just the html and a body with an ssi that just has "text" in the body, to no avail. It's like the page is ignoring the include like it's just a comment. I even checked firebug and it's showing nothing about the include.

I've tried:

<!--#include file="/file.html" -->
<!--#include file="/file.shtml" -->
<!--#include virtual="/file.html" -->


Does anyone have any ideas what could be wrong?

Answer

Be sure to make the extension of the page that is including the files end in .shtml. That way the server knows to process the directives within it. Otherwise, they'll be ignored.