SSI includes including relative includes?

SSI includes including relative includes?

Post by Leslie Mikese » Thu, 01 May 1997 04:00:00



Using apache's server-side includes, is there a way to have a document
include a 'master' template which in turn includes some other files
that are located relative to the original document, not the other
inclusion?  The idea here is to be able to add the same header to
a large number of documents but make them appear with navigation
aids that relate to their file system location.  It looks like
includes are always processed relative to the currently active location
so to make the scheme work a copy of the master template will have
to be in each subdirectory instead of having only one at an absolute
location.

Les Mikesell

 
 
 

1. SSI (document relative includes) in PWS . . ..

Personal Web Server from Microsoft (and IIS as well) does NOT
appear interpret 'document-relative' server side includes such as

<!--#include virtual="../all_includes/filename.txt" -->

correctly (or at least like Apache does).  Perhaps this is by design, I am
not sure.

Suppose, the include command is contained within a file named
"testing.shtml", which resides in a folder named "all_shtmls", this will
*appear* to work if *both* the folders (all_includes and all_shtml) are
just below the root level.

This is because PWS interprets the include statement as:
<!--#include virtual="/all_includes/filename.txt" -->   (Note: the leading
.. are missing).

Now, if you move both the folders (all_includes and all_shtmls) one level
below in the subdirectory, say, to underneath a subfolder named "newsub",
this ceases to work.

PWS still interprets the include command as

<!--#include virtual="/all_includes/filename.txt" -->

instead of

<!--#include virtual="/newsub/all_includes/filename.txt" -->

Apache would have done the latter.

Anyone else familiar with this phenomenon?  Any corroborations?  Or am I
mistaken somewhere?

Thanks and best regards,

~ Jhinuk ~

--
Jhinuk Chowdhury

2. Linux RH 8.0 Gateway / Firewall problem

3. ANSIfy include/linux/a.out.h and include/linux/nls.h

4. HELP: "DIP tty: set_disc(1): Invalid Argument" problems with SLIP!

5. GCC-2.5.8 won't compile [/usr/include/limits.h:52: No include path...

6. take me with you.... portable storage device

7. RFC: moving ACPI includes under include/

8. Trying to make a faster binary ...

9. Apache, Server Side Include: include

10. #include <linux/errno.h> WHERE are these includes?

11. One more time: /usr/include/linux, /usr/include/asm

12. Help - clashes between /usr/include and /usr/include/linux

13. How to include 1 line after the last #include in a bunch of c-files ?