Forum Moderators: open

Message Too Old, No Replies

Server Side Include (SSI) shows in DreamWeaver but not in IE

Using MS IIS 5 Server

         

indium

3:24 am on Jun 29, 2004 (gmt 0)

10+ Year Member



I have a server side include with the extension .shtm that I include into a html page using Dreamweaver MX 7.0. The include is just a table containing text and images. I am running IIS 5 on win XP pro.
The include shows up in the design window of Dreamweaver but does not show up in IE, but the rest of the page renders just fine. View source shows only the include line. I have tried the traditional echo date test include and that works fine. I have tried both "#include virtual=" and "# include file=", but neither works. Under the IIS 5 application configuration, there is an application mapping for .shtm, which has verbs set as GET,POST.

This is driving me crazy. Anybody have any ideas?

mattglet

11:36 am on Jun 29, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



<!--#include file="yourfile.ext"-->

Try that.

-Matt

crashomon

2:41 pm on Jun 29, 2004 (gmt 0)

10+ Year Member



If the file is in the same directory as the page that is calling the include, use file=.
If the file is in ANOTHER directory, then use virtual=

Also, try using filename.inc for the include instead of .shtm and see what happens.

Another thing to check is to make sure the included file does NOT contain <html> or <head> or <body> tags.

Does it still mess up for you after these tips? Let us know.

Thanks,

Patrick Elward

encyclo

2:46 pm on Jun 29, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to WebmasterWorld, indium.

If I understand it correctly, the file you want to include has the extension .shtm, but you're trying to include it into a .htm or .html file?

If this is the case, you've got things the wrong way round - the file into which you want to place the include should have the extension .shtm, and the included file can have any extension you like.

indium

5:53 pm on Jun 29, 2004 (gmt 0)

10+ Year Member



"If this is the case, you've got things the wrong way round - the file into which you want to place the include should have the extension .shtm, and the included file can have any extension you like."

That is correct - the include file has the .shtm extension. Thanks for pointing out that mistake. I'll make the change, but I also have tried using the .inc extension for the include (.htm for whole the page) and the include html did not show up, but perhaps that was related to a different problem. The include does not contain any <html><head> or <body> tags, just a table.

encyclo

6:56 pm on Jun 29, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



(.htm for whole the page)

If the whole page has the extension .htm, then you need .htm files to be parsed for SSI, not .shtm. If you are using includes only occasionally, you'd be better renameing the page to .shtm and leaving other pages which don't use includes as .htm.

The include does not contain any <html><head> or <body> tags, just a table.

That's correct - it's how it should be.

indium

2:24 am on Jun 30, 2004 (gmt 0)

10+ Year Member



Got it to almost work. After renaming the file that contains the include to have the extension .shtm the include html will appear in the page. If I name everything with the extension .htm, it doesn't work. Why is that? Is is a IIS thing? I will be moving this over to a production web server - I think it is IIS.

The include is in every page (i.e. alot of them). Some pages are in the root some in other folders. In my include html I reference some images. I can't find a way to make the image path change to adjust for different locations of different pages. Is there a way to do this? Do I have to have an absolute path?