Forum Moderators: phranque

Message Too Old, No Replies

Include File Is Not Working

         

learn4life

5:51 pm on Oct 17, 2005 (gmt 0)

10+ Year Member



Hello,

I hope I'm posting in the correct forum.

I've used SSI's before but with a different web host. I'm trying to use them on this new server and I can't seem to get them working. I would love if someone can help me.

After trying for sometime to speak with the hosting company to ask if the server is configured for this, they made me a little nervous because they were unsure as to what I was referring to, then they told me it should be able to work with .shtml pages.

Anyway, this is the path to the include file:
<!--#include virtual="/nav/TopNav.shtml"-->

The file is located in a folder called "nav".

The .htaccess file is in the root directory with the following code:

AddType text/html .shtml .shtm .htm .html
AddHandler server-parsed .shtml .shtm .htm .html
Options Indexes FollowSymLinks Includes

Now, what am I doing wrong?

Thanks so much and thanks for the opportunity to join this forum.

jdMorgan

6:04 pm on Oct 17, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



learn4life,

Welcome to WebmasterWorld!

By specifying a "replacement" set of Options, you will have disabled ExecCGI if it was enabled.

My recomendation is to use the "additive" form of the Options directive in .htaccess, i.e.


Options +Indexes +FollowSymLinks +Includes

so that your additional options are merged with those already in force (as defined in httpd.conf), rather than completely replacing them.

See the Apache core Options documentation [httpd.apache.org] for more info on the "replace" and "add" syntax of Options.

Also note that there should be a space preceding "-->" to strictly comply with the SSI syntax:


<!--#include virtual="/nav/TopNav.shtml" -->

Jim

learn4life

6:22 pm on Oct 17, 2005 (gmt 0)

10+ Year Member



I probably sound as though I know what I'm talking about when I posted my question - but in fact I'm slowly learning and in saying so I'm kinda lost when you say...

"My recomendation is to use the "additive" form of the Options directive in .htaccess, i.e.

Options +Indexes +FollowSymLinks +Includes"

Couple questions?

1. How can I turn on whatever I may have disabled?

2. Also, why would this format of doing SSI work on one server and not on another. I used it in this format before, the only difference I'm assuming is that I have to use .shtml instead of html.

3. Is there a way to test the server to see if it's truly set-up to do this?

Thanks again...I've been trying to get this to work for hours now.

learn4life

9:50 pm on Oct 18, 2005 (gmt 0)

10+ Year Member



Just found out that my web host doesn't support SSI's, what can I use in its place?

jdMorgan

10:28 pm on Oct 18, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



PHP or a 'real' hosting company...

Jim