SSI: The Include Command

Hi, Im using instructions on this page to try to include some navigation on all pages using SSI: http://www.htmlgoodies.com/beyond/webmaster/article.php/3473341

the site cart is in PERL, and I can't use PHP.

I go through "Can You Run SSI?" and I can, I see the day of the week on the test page, as long as the extension is shtml.

But when I then add <!--#include virtual="/virtual/left-sidebar.shtml" --> into my page, I don't get the navigation I've placed. The site is in Bootstrap, could there be some problem there?

the site is dev2.magickitchen.com, user melody. pw attached.
Melody ScottAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

gr8gonzoConsultantCommented:
An "include virtual" starts looking at the server root. For example, if your directory structure looks like:

/public_html
                       /virtual
                                   /left-sidebar.shtml

...then your path might need to be:
<!--#include virtual="/public_html/virtual/left-sidebar.shtml" -->

Optionally, you can just use "include file" if you want to specify a relative path. For example:

Let's say your main page is:
/public_html/index.html

Your includes are in:
/public_html/virtual/left-sidebar.html

In index.html, you would do:
<!--#include file="virtual/left-sidebar.shtml" -->

Notice the lack of the initial slash.
Melody ScottAuthor Commented:
Thank you. It's still not working, however, if you view the page navigation should appear in the left column.
gr8gonzoConsultantCommented:
I would suggest creating a more simple test.
Try creating a test.html file in every folder that simply has the name of the folder it's in, like:

/public_html/test.html = contains "public_html"
/public_html/virtual/test.html = contains "virtual"
...etc...
Do this for all your folders, and then add one line into your index file that has:
<!--#include file="test.html"-->

Also, just to be certain, your index file DOES end with the .shtml extension, right? That's the typical file extension for SSI-enabled files. If it's just .html, then it might not even be trying to process the includes.

One way to check is to view the source of the resulting page and see if you see the <!--#include ... --> line in the code itself. If you do, then the server isn't even trying to process your include request.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Melody ScottAuthor Commented:
That's right, it's shtml, because with the test given on the page I mentioned, html didn't work, but shtml did. I only have one file at the moment, so I'll give this a try. Thanks,

(Oh, also, I do see <!--#include ... --> line in the source, so it's not trying to call it.
Melody ScottAuthor Commented:
That's just not working, so there must be something server-side that's not allowing it. Thanks for your help.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
HTML

From novice to tech pro — start learning today.