Gossamer Forum
Home : Products : Links 2.0 : Discussions :

Alex - Apache need "index.shtml" for SSI, what to do next?

Quote Reply
Alex - Apache need "index.shtml" for SSI, what to do next?
Currently tying to use Links 2.0 on Apache 1.3 with links template version. Trying to do SSI pages in order to take advantage of parsing but having a serious set back. Links correctly builds all of the directories and the "index.shtml" pages, as it should, but on all my pages where each category's URL is printed, the category's file name (index.shtml) is not being added to the end of the URL.

For example, categories and subcategories, such as..

TOP:Bargins:Foods

..each one of these categories get printed a url of..

http://mywebsite.com/
http://mywebsite.com/Bargins/
http://mywebsite.com/Bargins/Food/

...with no "index.shtml" file name being added to the end of each category's URL.

I haven't modified any of your original configurations and didn't add other mods, so I believe I've correctly configured the links.cfg, which is:

Code:
# The name of an index file.
$build_index = "index.shtml";
# The extension to use for non index files:
$build_extension = ".shtml";

All my category's links are producing 404s each time I click on them...even though the "index.shtml" file exists within each category, as nph-built created them.

Which config file(s) do I modify in order to get the index.shtml file name attached to the ending of ALL of the categories URLs (including subcategories)?

Apache/Linux server is configured to recognize "index.html" and "index.shtml" as being two totally different files. "index.html" is configured as the default file when a URL doesn't include an actual file name, so I'm stuck with that.

Please help or I can't use Links 2.0 with SSI on my server. I not in the position where I can move to another server either.
Quote Reply
Re: Alex - Apache need "index.shtml" for SSI, what to do next? In reply to
Your Apache configuration needs a command that looks like this:

Quote:
DirectoryIndex index.html index.cgi index.shtml

When someone goes to any directory on your site with a URL that ends with a "/", one of those files will load. They will load in the order listed. So, for example, if all three types of files are in the same directory, only index.html will load. If there is no index.html or index.cgi in the directory but there is an index.shtml file, the index.shtml file will load.

I hope this helps.
Quote Reply
Re: Alex - Apache need "index.shtml" for SSI, what to do next? In reply to
If you are using ssi on most of your pages,
try adding this to your .htaccess file.

AddHandler server-parsed .html

This way the server will parse every .html page.



------------------
JRM Studios www.jrmstudios.com
The Hotrodding Network www.hotrodding.net



[This message has been edited by John R Marshall (edited March 16, 1999).]
Quote Reply
Re: Alex - Apache need "index.shtml" for SSI, what to do next? In reply to
John,

That is true but it also adds overhead to the server and can make a site appear sluggish because every html document gets parsed whether or not it really needs to.
Quote Reply
Re: Alex - Apache need "index.shtml" for SSI, what to do next? In reply to
Bobsie,
Yep, that fixed the problem. Smile
Thanks!