Jump to content

Recommended Posts

Posted

So I'm attempting to convert this template that my client bought to use SSI code. Here is the code

 

>
<!-- #include virtual="../includes/header.ssi" -->

 

This is not being parsed by the server at all.

 

To see it "in action" (or lack thereof) go to http://www.arizonabeehive.com/test/html/index.shtml

For reference, this is what it should look like http://www.arizonabeehive.com/test/html/index.html

If you "view source" you can see that the code above is just being send to the client.

 

I've read a few posts about how to do the same thing in PHP but IMO this should be working the way it is. My .htaccess file was blank when I started. I tried making all kinds of changes, nothing worked and I always had the same result.

 

Any ideas?

Posted
Try adding the following to your .htaccess file

 

>AddType text/html .shtml
AddHandler server-parsed .shtml

 

I've tried adding this to the .htaccess file in the public_html root and in just the directory that contains the one shtml file I'm trying to run. So far no difference. I've also looked at the cPanel for the site, under Apache Handlers, it says "server-parsed .shtml" under the system handlers and shtml already exists as a mime type.

 

Very strange. This should be working...

Posted

Ok I've fixed it. Appearently, it's very VERY picky about "whitespace".

 

This works:

><!--#include virtual="../header.ssi" -->

 

This does NOT work

><!-- #include virtual="../header.ssi" -->

 

Hopefully this helps someone else out later down the line.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...