By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,766 Members | 1,261 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,766 IT Pros & Developers. It's quick & easy.

Please Help With SSIs...

P: n/a
Not running my own server. My site host says I can use SSIs on my pages.
When I try the supposedly "included" info never shows up in any browser
I've tried.

On pages where info (tags, etc) is to be included I enter the following
type of code, as I've learned from a number of what I consider rather
knowledgable people and sites online:
<!--#include file="whatever.shtml" -->

I used "file" 'cause that's supposed to be relative to the directory of the
calling html file. I was told "Virtual" is relative to the http server
root. Since It's not my server, but is my directory, I used "file".

The tech sprt at my contracted host tells me I have to rename the calling
html file as shtml. I quote his latest response:
"There are only a couple page types that you can do includes with.
That being shtml, ASP (Also ASP.Net Pages) and PHP.
Html pages can do nothing other than straight HTML code."

Is he correct? Or is he jerking my chain?

Please help. I have many more pages to add to our site, and don't relish
the idea of doing edits on all those pages when we change something. TIA
Jul 20 '05 #1
Share this Question
Share on Google+
8 Replies


P: n/a
Sorry. Forgot to mention. They recently upgraded to Win2K3 Server. Don't
know if that would make any difference. Don't see how. TIA

"Woodsrunner" <an*****@newsgroup.net> wrote in message
news:Gy*******************@nwrddc02.gnilink.net...
Not running my own server. My site host says I can use SSIs on my pages.
When I try the supposedly "included" info never shows up in any browser
I've tried.

On pages where info (tags, etc) is to be included I enter the following
type of code, as I've learned from a number of what I consider rather
knowledgable people and sites online:
<!--#include file="whatever.shtml" -->

I used "file" 'cause that's supposed to be relative to the directory of the calling html file. I was told "Virtual" is relative to the http server
root. Since It's not my server, but is my directory, I used "file".

The tech sprt at my contracted host tells me I have to rename the calling
html file as shtml. I quote his latest response:
"There are only a couple page types that you can do includes with.
That being shtml, ASP (Also ASP.Net Pages) and PHP.
Html pages can do nothing other than straight HTML code."

Is he correct? Or is he jerking my chain?

Please help. I have many more pages to add to our site, and don't relish
the idea of doing edits on all those pages when we change something. TIA

Jul 20 '05 #2

P: n/a
Woodsrunner wrote:
The tech sprt at my contracted host tells me I have to rename the calling
html file as shtml.
That is a common configuration.
I quote his latest response:
"There are only a couple page types that you can do includes with.
That being shtml, ASP (Also ASP.Net Pages) and PHP.
Html pages can do nothing other than straight HTML code."

Is he correct?
Only he knows how the server is set up. But you can test it, can't you?
Rename your file with an .shtml extension, put the include directive in
it, and see what happens. BTW, the file that you include can have any
name and extension you want. (foo.txt, foo.include, foo.html, etc.)

I have many more pages to add to our site, and don't relish
the idea of doing edits on all those pages when we change something.


SSI directives are a bit limited. Why don't you learn php? It'll be much
more flexible in the future.

--
Brian (remove "invalid" from my address to email me)
http://www.tsmchughs.com/
Jul 20 '05 #3

P: n/a
On Thu, 13 May 2004 00:47:37 GMT, Woodsrunner <an*****@newsgroup.net>
wrote:
Sorry. Forgot to mention. They recently upgraded to Win2K3 Server.
Don't
know if that would make any difference. Don't see how. TIA


Basically, the server has been set up to not allow SSI in .html. They do
this because otherwise the server has to go through every html file
looking for SSI directives. That's an extra load.

One can configure a server to allow SSI in html, but your host chose not
to do this. There are a few options.

1) Deal with it, and change filenames and links to .shtml

2) Beg and plead for them to change, which they won't

3) Find a host using an Apache server that allows .htaccess and set your
own SSI permissions.
Jul 20 '05 #4

P: n/a
Woodsrunner wrote:
The tech sprt at my contracted host tells me I have to rename the calling
html file as shtml. I quote his latest response:
"There are only a couple page types that you can do includes with.
That being shtml, ASP (Also ASP.Net Pages) and PHP.
Html pages can do nothing other than straight HTML code."

Is he correct? Or is he jerking my chain?


He appears to be displaying a limited understanding of the issue.

HTML pages can not do includes.
ASP pages can do includes.
PHP can do includes (with different syntax)
There is no such thing as an SHTML page.

SSI works by parsing _any_ type of text file for include directives.
The server has to be configured to run SSI over the files.
A common configuration is to look for the .shtml file extension to decide if
a file should be parsed for SSI.

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Jul 20 '05 #5

P: n/a
"Woodsrunner" <an*****@newsgroup.net> wrote in message news:<Gy*******************@nwrddc02.gnilink.net>. ..
"There are only a couple page types that you can do includes with.
That being shtml, ASP (Also ASP.Net Pages) and PHP.
Html pages can do nothing other than straight HTML code."

Is he correct? Or is he jerking my chain?


It may or may not be possible (depending on server settings) to
configure your server to parse .html files as well as .shtml files. In
Apache, for example, you'd put the following line in your .htaccess:
AddHandler server-parsed .shtml

The problem is, parsing each and every .html file takes more CPU time
than would be necessary, that's why you often see the situation where
..html files aren't parsed, but .shtml files are.

Garmt de Vries.
Jul 20 '05 #6

P: n/a

"Woodsrunner" <an*****@newsgroup.net> wrote in message
news:Gy*******************@nwrddc02.gnilink.net...
Not running my own server. My site host says I can use SSIs on my pages.
When I try the supposedly "included" info never shows up in any browser
I've tried.
The browser won't have anything to do with it, since SSIs are resolved on
the server and the browser has no way of knowing that some portion of a page
was produced via an inclusion instead of via code existing directly inside
the requested page.

On pages where info (tags, etc) is to be included I enter the following
type of code, as I've learned from a number of what I consider rather
knowledgable people and sites online:
<!--#include file="whatever.shtml" -->

I used "file" 'cause that's supposed to be relative to the directory of the calling html file. I was told "Virtual" is relative to the http server
root. Since It's not my server, but is my directory, I used "file".

The tech sprt at my contracted host tells me I have to rename the calling
html file as shtml. I quote his latest response:
"There are only a couple page types that you can do includes with.
That being shtml, ASP (Also ASP.Net Pages) and PHP.
Html pages can do nothing other than straight HTML code."

Is he correct? Or is he jerking my chain?


He's probably correct. It's somewhat inefficient to pass pages that are
static through the SSI process, so typically .html files are treated as
static, and the server is configured to intercept .shtml files for the
special processing.

Jul 20 '05 #7

P: n/a
David Dorward wrote:
Woodsrunner wrote:
The tech sprt at my contracted host tells me I have to rename the
calling html file as shtml. I quote his latest response: "There are only a couple page types that you can do includes
with. That being shtml, ASP (Also ASP.Net Pages) and PHP.
Html pages can do nothing other than straight HTML code."
He appears to be displaying a limited understanding of the issue.


Or simply giving an answer that's specific to the server he works to
support.

--
Brian (remove "invalid" from my address to email me)
http://www.tsmchughs.com/
Jul 20 '05 #8

P: n/a
Excellent suggestions and help from all. Thank you.

"Woodsrunner" <an*****@newsgroup.net> wrote in message
news:Gy*******************@nwrddc02.gnilink.net...
Not running my own server. My site host says I can use SSIs on my pages.
When I try the supposedly "included" info never shows up in any browser
I've tried.

On pages where info (tags, etc) is to be included I enter the following
type of code, as I've learned from a number of what I consider rather
knowledgable people and sites online:
<!--#include file="whatever.shtml" -->

I used "file" 'cause that's supposed to be relative to the directory of the calling html file. I was told "Virtual" is relative to the http server
root. Since It's not my server, but is my directory, I used "file".

The tech sprt at my contracted host tells me I have to rename the calling
html file as shtml. I quote his latest response:
"There are only a couple page types that you can do includes with.
That being shtml, ASP (Also ASP.Net Pages) and PHP.
Html pages can do nothing other than straight HTML code."

Is he correct? Or is he jerking my chain?

Please help. I have many more pages to add to our site, and don't relish
the idea of doing edits on all those pages when we change something. TIA

Jul 20 '05 #9

This discussion thread is closed

Replies have been disabled for this discussion.