This is Interesting: Free Magazines for Graphics designers and webmasters
Home > Archive > Webmaster forum > January 2005 > SSI and server root
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
SSI and server root
|
|
| Steve Greenaway 2005-01-29, 7:20 pm |
| I've got a simple menu stored in its own file, which is included in
pages in the same directory, plus one or two directories deeper. So
far, I understand that ../ will bring me one level up, and that / will
bring me to the server root.
My understanding is also that the typical server setup is to set a
virtual root where the users web directory is. For instance,
if my web directory on the machine is /home/users/macfisto/public_html,
apache lets me use public_html as root, so any link to / will call files
in public_html (and my address online is simply ~macfisto/ for the index
file.
This isn't working for me. In my menu file (0-left-menu.html) if I
put a / in front of each linked filename, it brings me to the main
directory of my host. Instead of getting
www.engsoc.org/~macfisto/index.html I get
www.engsoc.org/index.html, which is wrong and actually gives their
fancy 404 page.
Is there something I can put in .htaccess or elsewhere that tells
apache to treat public_html as root? I hope that all made some sense.
--
- Steve
"I think a good friend would recommend CLR to all his friends."
| |
|
|
| Steve Greenaway 2005-01-29, 7:20 pm |
| Kermit the Frog stuck a mic in Ken's face, who said:
>Hi Steve -
[color=darkred]
>/ will take you to the *host* root.
>That is working correctly. The host is www.engsoc.org so /[anything]
>is properly interpreted as http://www.engsoc.org/[anything]
Thanks. So there's no way to make the host treat public_html
as a virtual root of some sort?
--
- Steve
"I think a good friend would recommend CLR to all his friends."
| |
| Blinky the Shark 2005-01-29, 11:20 pm |
| Steve Greenaway wrote:
> Kermit the Frog stuck a mic in Ken's face, who said:
[color=darkred]
[color=darkred]
[color=darkred]
[color=darkred]
> Thanks. So there's no way to make the host treat public_html
> as a virtual root of some sort?
I have public_html set as document root in Apache, and I get what you
wish to have, here.
--
Blinky Linux Registered User 297263
Response To Extended Endless September:
Now kill-filing posts made with User-Agent G2
| |
| Steve Greenaway 2005-01-29, 11:20 pm |
| Kermit the Frog stuck a mic in Blinky's face, who said:
>I have public_html set as document root in Apache, and I get what you
>wish to have, here.
Any idea how to do that? :) I'm just trying to learn as much as I
can before I start emailing the host...
--
- Steve
"I think a good friend would recommend CLR to all his friends."
| |
| Blinky the Shark 2005-01-29, 11:20 pm |
| Steve Greenaway wrote:
> Kermit the Frog stuck a mic in Blinky's face, who said:
[color=darkred]
> Any idea how to do that? :) I'm just trying to learn as much as I
> can before I start emailing the host...
I use Webmin's Apache front end. At bottom, it's probably a directive
in httpd.conf if that tool is not available to you.
--
Blinky Linux Registered User 297263
Response To Extended Endless September:
Now kill-filing posts made with User-Agent G2
| |
|
| Hi Steve -
On 30 Jan 2005 00:26:21 GMT, Steve Greenaway <macfisto@engsoc.org>
wrote:
>Kermit the Frog stuck a mic in Blinky's face, who said:
>
>
>Any idea how to do that? :) I'm just trying to learn as much as I
>can before I start emailing the host...
What you are trying to do is make / point to ~macfisto/. What Blinky
is talking about is making your ~macfisto directory to be / (the root
of http://www.engsoc.org/), i.e. hijack the host. Not the same thing
at all.
There are two ways to go:
1. Instead of /, use /~macfisto/
2. Use multiple "../"s. You're not limited to just one.
Here a pointer to my home page from a page three levels down:
<A HREF="../../../">Home Page</A>
Number 2 has the benefit that if your pages move so that they are no
longer in directory /~macfisto, the links will still work.
--
Ken
http://www.ke9nr.net/
| |
| Steve Greenaway 2005-01-30, 7:18 pm |
| Kermit the Frog stuck a mic in Ken's face, who said:
>What you are trying to do is make / point to ~macfisto/. What Blinky
>is talking about is making your ~macfisto directory to be / (the root
>of http://www.engsoc.org/), i.e. hijack the host. Not the same thing
>at all.
>There are two ways to go:
>1. Instead of /, use /~macfisto/
I'll check this one out.
>2. Use multiple "../"s. You're not limited to just one.
>Here a pointer to my home page from a page three levels down:
><A HREF="../../../">Home Page</A>
>Number 2 has the benefit that if your pages move so that they are no
>longer in directory /~macfisto, the links will still work.
I was starting to do that. The problem was that I was trying to include
the same menu, via SSI into documents in different depths. So ../../ was
working on one page, but putting the same menu in a page higher up
will break the design too. The only other solution I see is to include
different menus for different levels, but that sort of kills one of the
conveniences of SSI.
Maybe I'll just learn to shove the whole site into a database and
control everything with PHP variables...
--
- Steve
"I think a good friend would recommend CLR to all his friends."
|
|
|
| | Copyright 2003 - 2008 forum4designers.com Software forum Computer Hardware reviews |
|