The server on my home computer points
"http://localhost/~squash/"
to "~/Sites/" where all my .html and .shtml files reside.
Every .html file has
<BASE HREF="http://localhost/~squash/">
in the header
Under "~/Sites/" is a subdirectory "~/Sites/Include/"
intended for statements such as
<!--#include virtual="Include/file.shtml" -->
Is it legal, and does it mean anything, to have an initial
slash, i.e
<!--#include virtual="/Include/file.shtml" -->
If the is latter is legal, what does it mean relative to
the former? -Thank you, all.
Under "~/Sites/" is a subdirectory "~/Sites/Include/" intended for
statements such as
<!--#include virtual="Include/file.shtml" -->
Is it legal, and does it mean anything, to have an initial slash, i.e
<!--#include virtual="/Include/file.shtml" -->
If the is latter is legal, what does it mean relative to the former?
-Thank you, all.
On 6/8/22 6:29 AM, Gentsquash wrote:
Under "~/Sites/" is a subdirectory "~/Sites/Include/" intended for statements such as
<!--#include virtual="Include/file.shtml" -->
I assume that you're talking about Server Side Include (a.k.a. SSI).
Is it legal, and does it mean anything, to have an initial slash, i.e
<!--#include virtual="/Include/file.shtml" -->
The leading slash means that the included file is relative to Document_Root.
The lack of leading slash means that the included file is relative to
the directory the file doing the include is in.
Ah. I thought that
<!--#include virtual="Include/file.shtml" -->
was relative to the
<BASE HREF="http://localhost/~squash/">
Grant are you saying this:
In file
~/Sites/A/B/C/Grant.html
suppose I have
<BASE HREF="http://localhost/~squash/">
Does
<!--#include virtual="Include/file.shtml" -->
search for a file called
~/Sites/A/B/C/Include/file.html
whereas (putting in a leading-slash)
<!--#include virtual="/Include/file.shtml" -->
searches for
~/Sites/Include/file.html
?
Thank you, Grant.
Yes, I meant Server Side Include [it's been about 15 years since I
studied html, and I have forgotten everything ... until I recently
moved files, and broke stuff.]
Ah. I thought that
<!--#include virtual="Include/file.shtml" -->
was relative to the
<BASE HREF="http://localhost/~squash/">
Grant are you saying this:
Thanks again for your help, Grant. --Jonathan
<BASE HREF="http://localhost/~squash/"> is processed /client/ side.
Thank you, Grant, for the detailed explanation,
I understand things better now.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 349 |
Nodes: | 16 (0 / 16) |
Uptime: | 142:10:31 |
Calls: | 7,613 |
Calls today: | 1 |
Files: | 12,790 |
Messages: | 5,684,452 |