View Full Version : SSI - Won't display
Paul Hicks
02-05-2007, 11:49 PM
This is my first attempt at an SSI. I can't get the inclusion to display in the browser.
Details:
Site: www.chaletbb.ca
Page: www.chaletbb.ca/html/Haliburton-Forest-Wolf-Centre.html
SSI: www.chaletbb.ca/html/SSI-bottom.shtm
I've searched and read the SSI topics, and noted that Sheila said to rename the
index.html to
index.shtml
I tried that, no change.
I'd appreciate any advice.
Paul.
sheila
02-06-2007, 01:37 AM
Rename the file
Haliburton-Forest-Wolf-Centre.html
to
Haliburton-Forest-Wolf-Centre.shtml
It is the file that includes the SSI includes/commands that needs to have the .shtml extension, not the file to be included.
Paul Hicks
02-06-2007, 01:58 AM
Hi Sheila,
I tried all that stuff before posting, and didn't work for me.
I changed the extension of the main "wolf" page to .shtml
and the insert from .shtm to htm.
Have tried all combinations.
'
The only way I can get it to work is to click the file name inside "Command 'N' Control"
Paul.
sheila
02-06-2007, 02:06 AM
OK, but at least now that you've renamed the file to .shtml as I suggested above, we are getting this text at the bottom of the page:
[an error occurred while processing this directive]
Which indicates that the server is at least attempting to process the SSI command (before it wasn't even doing that). It remains now to examine the SSI command and see why that command is not working (there must be some error with the command...)
either the syntax of the command may be incorrect
or the file that you are referring to may not be in the correct place
or something of that nature...
sheila
02-06-2007, 02:13 AM
OK, right now what I'm seeing (I took a peek at the files in your site) is that you have this SSI directive in the wolf-file:
<!--#include file="SSI-bottom.shtm" -->
But you've renamed the SSI-bottom file to
SSI-bottom.htm
You need to have the file names match exactly.
It seems that right now the server is throwing an error because the file
SSI-bottom.shtm does not exist (since you renamed the extension to .htm)
Paul Hicks
02-06-2007, 02:27 AM
Okay, will take a look. Thanks for going in there for a look see.
Paul Hicks
02-06-2007, 02:35 AM
I changed the extension to .htm on the "wolf" page, and the page now loads okay. BUT, only if, in the address window, the extension has .shtml
In other words when trying to load the wolf page by clicking on the "wolf" page from the nav menu, I get a "not found" message.
The index page has the .shtml extenstion in the root directory.
sheila
02-06-2007, 02:39 AM
That's because your nav menu on the left has the following link for Wolf Centre:
http://www.chalet-by-the-lake-b-and-b.com/html/Haliburton-Forest-Wolf-Centre.html
The extension in the link needs to be changed to .shtml to match the actual file which is now working properly at
http://www.chalet-by-the-lake-b-and-b.com/html/Haliburton-Forest-Wolf-Centre.shtml
Paul Hicks
02-06-2007, 02:54 AM
Okay, that's fixed and working now with the nav bar change.
You're getting me there.
However, the index.shtml page won't come up. I changed file extension on "wolf" page on the nav bar on the index page. Now the index page has a "not found error."
Paul Hicks
02-06-2007, 03:14 AM
Sheila, I know what I've got to do, change the extension on the nav bars to reflect the changes to .shtml
It'll take a bit of work, but I'll get it working okay tomorrow night. Gotta get some sleep now.
Thanks ever so much for your help. I wouln't have made it on my own.
Regards,
Paul Hicks.
www.chaletbb.ca
sheila
02-06-2007, 03:32 AM
Good deal. Glad to see that it "clicked" for you. :yeah:
Andilinks
02-06-2007, 04:03 AM
All my includes work fine as .txt files, is there any reason to use an .(s)htm(l) extension?
sheila
02-06-2007, 06:53 PM
All my includes work fine as .txt files, is there any reason to use an .(s)htm(l) extension?
From a server perspective, it makes absolutely no difference.
However, from a developer perspective, depending on the tools that you use to edit your files, and what type of content you have in the files, it may be useful to choose a file extension that gives you syntax colors to match the type of content in your include files.
For example, if your include files have HTML content, then you might want a .html extension if your editor provides HTML syntax highlighting for such files.
Or if your include files have PHP content, then you might want a .php extension on the file.
Etc...
Personally, I find that when working with code, appropriate syntax highlighting helps me to be so much more productive.
Of course, your mileage may vary...
Andilinks
02-06-2007, 09:14 PM
From a server perspective, it makes absolutely no difference.Oh, I didn't know that. Thanks for the information, I thought maybe it made a difference to the server.
Andi
vBulletin® v3.6.8, Copyright ©2000-2009, Jelsoft Enterprises Ltd.