SitePoint Sponsor |
|
User Tag List
Results 1 to 7 of 7
Thread: SSI in sub directories?
-
Oct 10, 2000, 00:59 #1
- Join Date
- Oct 2000
- Posts
- 6
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
How do I implement Server Side Includes on pages in a sub directory?
I have set up my home page with the head, menu and footer as SSI. I want to use these same htm files for my /information/index.shtml file as well. But its looking for the files in the subdirectory. Obviously making a copy of the files would work, but that kind of defeats the purpose of SSI.
Any ideas?
Thanks.
-
Oct 10, 2000, 02:11 #2
- Join Date
- Oct 2000
- Posts
- 89
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
-
Oct 10, 2000, 03:50 #3
- Join Date
- Sep 1999
- Location
- Singapore
- Posts
- 854
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Use root relative addressing.
I think that's the term for it...
-
Oct 10, 2000, 05:45 #4
- Join Date
- Sep 2000
- Location
- South Africa
- Posts
- 186
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
The answer to your problem is simple.
When you want to include a file which is in the same directory, use -
<!--#include file="header.html" -->
otherwise, to reference a file in another directory, use -
<!--#include virtual="/includes/header.html" -->
where the path you supply is with reference to the Root directory.
Go to http://www.stars.com/Authoring/SSI/Intro/include.html for a more detailed explanation of the above
Cheers...
-
Oct 10, 2000, 08:08 #5
- Join Date
- Sep 2000
- Posts
- 27
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
actually that depends on your hosting provider. some require to save your ssi in a cgi-bin,
rgds,
markus
------------------------
http://www.webtipz.com/
------------------------
is a resource for every internet marketing specialist and manager in the ebusiness. You will find regular updated information how to get more hits, how to increase your revenue over the web and how to develop your brandmark. Find out more about WAP and PalmPilot Software.
-----------------------------------------------------------------------
-
Oct 13, 2000, 06:35 #6
- Join Date
- Oct 2000
- Posts
- 6
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Thanks for that.
This kind of spills over though. If my SSI file to be included links to images/foo.gif that works fine on the home page. But not on the subdirectory pages. Then I need ../images/foo.gif
Is it possible to have universal links, or do I need a separate file to include?
And what does that root referencing stuff someone mentioned do? I thought about using a base tag, but that didn't help much.
-
Oct 13, 2000, 08:04 #7
Bookmarks