OT - Server Side Includes question
-
- Mega User
- Posts: 169
- Joined: Sun Oct 05, 2003 4:21 am
OT - Server Side Includes question
Hi all - I would like to convert my website to serverside includes but am having a problem. Basically, the shtml file is not recognized by the browser. I'm using IE and when I go to the page it simply says page not found. Here's the url:
http://www.citytech.cuny.edu/test1.shtml
The page IS on the server.
The server people do not know what is wrong. The includes do work in asp - but I want to use SSI. Anyone know if the server has to be configured in a certain way?
Thank you for any help you can provide!
http://www.citytech.cuny.edu/test1.shtml
The page IS on the server.
The server people do not know what is wrong. The includes do work in asp - but I want to use SSI. Anyone know if the server has to be configured in a certain way?
Thank you for any help you can provide!
Hey tep...
Not all servers require shtml in order to use includes. Apache, and I think IIS, have settings to allow the server to 'include' with just html.
For instance, my http://pdaoutlet.biz/, running on Linux/Apache and with index.html, uses at least 3 includes with no problems. In my case it's...
Not sure at all about your 404, but I'd worry about an ISP that couldn't help in that regard.
Not all servers require shtml in order to use includes. Apache, and I think IIS, have settings to allow the server to 'include' with just html.
For instance, my http://pdaoutlet.biz/, running on Linux/Apache and with index.html, uses at least 3 includes with no problems. In my case it's...
Code: Select all
<!--#include virtual="file.html" -->
John
-
- Mega User
- Posts: 169
- Joined: Sun Oct 05, 2003 4:21 am
Hi,
Thanks for your reply
The includes in the normal html files don't work either...
I did some reading that seems to indicate that the apropriate file extention (i.e. shtml) needs to be entered into a file for those extensions to be recognized. Something about a "srm.conf" file or htaaccess ... do you know anything about this... I know we're using IIS...
Thanks for your reply
The includes in the normal html files don't work either...
I did some reading that seems to indicate that the apropriate file extention (i.e. shtml) needs to be entered into a file for those extensions to be recognized. Something about a "srm.conf" file or htaaccess ... do you know anything about this... I know we're using IIS...
Are you running this server yourself, or is it an ISP?
There is a way to get the server to parse include files without having 's' in the suffix, but, according to my IT folks, a number of things can go bad (M$ lives!) - including asp, indexing, certain bots in FP, etc.
I'm not running IIS, so I don't have an exact answer, but basically right-click on My Computer, Properties, find the server tab, click on the root level icon, and "somewhere in there" is a tab that will allow you to make the addition. Not much help, I know, but best I can do off the top of a few heads.
Bottom line - Apache...
There is a way to get the server to parse include files without having 's' in the suffix, but, according to my IT folks, a number of things can go bad (M$ lives!) - including asp, indexing, certain bots in FP, etc.
I'm not running IIS, so I don't have an exact answer, but basically right-click on My Computer, Properties, find the server tab, click on the root level icon, and "somewhere in there" is a tab that will allow you to make the addition. Not much help, I know, but best I can do off the top of a few heads.
Bottom line - Apache...
John
-
- Mega User
- Posts: 169
- Joined: Sun Oct 05, 2003 4:21 am
Same situation here. But that's OK - got enough problems without having to worry about server admin on top of it all.tepidarium wrote:I can only place/delete files on the server. I can't make modifications. It's in the IT dept. hands & out of mine...jgillett wrote:Are you running this server yourself, or is it an ISP?
Tell your IT folks to read the books. It can be done.
John
- fredlongworthhighschool
- Mega Advanced
- Posts: 362
- Joined: Fri Jun 27, 2003 11:34 am
- Location: Manchester, England.
- Contact:
-
- Mega User
- Posts: 169
- Joined: Sun Oct 05, 2003 4:21 am
Hey! THe IT guys got the shtml extension working!
A question for you SSI gurus - I read on Microsoft's site that good SSI style is to name include files with the ".inc" extension. Although almost any type of file can be included.
I named a a file with the .inc extension but dreamweaver won't let me open it. When I try to open the file in Dreamweaver I get the following message...
"Can't find a valid editor for this file extension."
What extension do you reccomend for include files? What do you guys do?
Thanks!
A question for you SSI gurus - I read on Microsoft's site that good SSI style is to name include files with the ".inc" extension. Although almost any type of file can be included.
I named a a file with the .inc extension but dreamweaver won't let me open it. When I try to open the file in Dreamweaver I get the following message...
"Can't find a valid editor for this file extension."
What extension do you reccomend for include files? What do you guys do?
Thanks!
Should I say "we told ya so"? Naw...
Anyway, 2 things come to mind. In DW Prefs under File Types/Editors the .inc should already be there as a default in the 'Open in code view:' line. If not, just add it to the others in the list. With Win, you might also need to add INC under Folder Options/File Types and set that to DW so the stupid OS knows what to do. The other would be to just end your include files in .htm or .html, as, I think, most of the rest of the world does (including me!).
Anyway, 2 things come to mind. In DW Prefs under File Types/Editors the .inc should already be there as a default in the 'Open in code view:' line. If not, just add it to the others in the list. With Win, you might also need to add INC under Folder Options/File Types and set that to DW so the stupid OS knows what to do. The other would be to just end your include files in .htm or .html, as, I think, most of the rest of the world does (including me!).
John
-
- Mega User
- Posts: 169
- Joined: Sun Oct 05, 2003 4:21 am
Hi John -John wrote:Should I say "we told ya so"? Naw...
Anyway, 2 things come to mind. In DW Prefs under File Types/Editors the .inc should already be there as a default in the 'Open in code view:' line. If not, just add it to the others in the list. With Win, you might also need to add INC under Folder Options/File Types and set that to DW so the stupid OS knows what to do. The other would be to just end your include files in .htm or .html, as, I think, most of the rest of the world does (including me!).
Thanks for your reply...
Is it okay to use .txt as an include...I tried it and it seems to work... any negatives with this extension?
Arg...now I've got to manually convert all .html apges to .shtml pages in the site window of DW...
Never tried .txt. Just always 'assumed' that since it was actually code I was including, that's what I'd call it.tepidarium wrote:Thanks for your reply...
Is it okay to use .txt as an include...I tried it and it seems to work... any negatives with this extension?
If they did it right that shouldn't be necessary. I use plenty of includes on our IIS servers and no .shtml - just .htm.tepidarium wrote:Arg...now I've got to manually convert all .html apges to .shtml pages in the site window of DW...
John
-
- Mega User
- Posts: 169
- Joined: Sun Oct 05, 2003 4:21 am
Well, from what I've read if you want normal html files to parse for includes, you've got to specify in the server settings.John wrote: If they did it right that shouldn't be necessary. I use plenty of includes on our IIS servers and no .shtml - just .htm.
I think it is a good idea to use the shtml file extension so you have an option to use normal html files where the server won't look to automatically parse the file thus taking a bit more load time... oh well, guess I gotta keep plugging away in DW site window!
My two cents:
I don't use DW, but I assume that it has an internal code editor for common file types that uses some sort of syntax highlighting, no? Even if you specify your own editor, I would assume you'd use one with syntax highlighting. If so, I would assume that htm, html, and shtml are all recognized formats for the syntax parsing. If you name your include files as .inc, or especially .txt you, might lose the syntax highlighting, or at least have to tell it which syntax set to use for the file type.
Kevin
I don't use DW, but I assume that it has an internal code editor for common file types that uses some sort of syntax highlighting, no? Even if you specify your own editor, I would assume you'd use one with syntax highlighting. If so, I would assume that htm, html, and shtml are all recognized formats for the syntax parsing. If you name your include files as .inc, or especially .txt you, might lose the syntax highlighting, or at least have to tell it which syntax set to use for the file type.
Kevin
-
- Beginner
- Posts: 1
- Joined: Tue Aug 08, 2006 4:40 am
Found a link that describes how to configure IIS
I also had a problem with parsing non .shtm(l) files and found the solution here:
http://my.execpc.com/~keithp/bdlognt.htm#ntparse
Hope this helps anyone who finds this post.
Jim
http://my.execpc.com/~keithp/bdlognt.htm#ntparse
Hope this helps anyone who finds this post.
Jim