Virtual hosts: How to make proper intra-site URL's?
I have set up a site: www.site In this site, there are a few virtual hosts: www.host1 --> www.site/Host1 www.host2 --> www.site/Host2 Thanks to a nice access rule, both the left and right names can be used to refer to the information. So far so good. In www.site/Host1 I have define a navigation bar dtml method to show some important check points in the host. Question: How do I make relative URLs in the navigation bar work so that they work under all circumstances. E.g. if I have a "People" Folder under "Host1" listed in the navigation bar, I'd like to see that the link shows up as follows: If I am looking at page: "People" should link to: http://www.host1/ People or http://www.host1/People http://www.host1/News ../People or http://www.host1/People http://www.site/Host1 People or http://www.site/Host1/People http://www.site/Host1/News ../People or http://www.site/Host1/People I have not been able to produce this effect using either BASE0..N or URL0..N. Help? Rob Hooft -- ===== rob@hooft.net http://www.hooft.net/people/rob/ ===== ===== R&D, Nonius BV, Delft http://www.nonius.nl/ ===== ===== PGPid 0xFA19277D ========================== Use Linux! =========
----- Original Message ----- From: Rob W. W. Hooft <rob@hooft.net>
I have set up a site:
www.site
In this site, there are a few virtual hosts:
www.host1 --> www.site/Host1 www.host2 --> www.site/Host2
Thanks to a nice access rule, both the left and right names can be used to refer to the information. So far so good.
You mention an Access Rule, but do you have SiteRoots in the Host1 and Host2 folders? Cheers, Evan @ digicool & 4-am
"ES" == Evan Simpson <evan@4-am.com> writes:
ES> ----- Original Message ----- From: Rob W. W. Hooft ES> <rob@hooft.net>
I have set up a site:
www.site
In this site, there are a few virtual hosts:
www.host1 --> www.site/Host1 www.host2 --> www.site/Host2
Thanks to a nice access rule, both the left and right names can be used to refer to the information. So far so good.
ES> You mention an Access Rule, but do you have SiteRoots in the ES> Host1 and Host2 folders? Yes, I do! So: the URL0..N and PARENT0..N do refer to the right host name. The problem is that since the "level" is different for "www.host1" and for "www.site/Host1", so I don't know to which PARENT or URL I need to refer.... Side effect of the AccessRule is also that the Z2.log file doesn't log enough any more as I mailed yesterday..... I'd still be interested in a solution to that problem as well.... Regards, Rob -- ===== rob@hooft.net http://www.hooft.net/people/rob/ ===== ===== R&D, Nonius BV, Delft http://www.nonius.nl/ ===== ===== PGPid 0xFA19277D ========================== Use Linux! =========
Following up to my own post: RWWH> If I am looking at page: "People" should link to: RWWH> http://www.host1/ People or http://www.host1/People RWWH> http://www.host1/News ../People or http://www.host1/People RWWH> http://www.site/Host1 People or http://www.site/Host1/People RWWH> http://www.site/Host1/News ../People or http://www.site/Host1/People To accomplish this it looks like I need the "base" url not of the current page being viewed, but the "base" url (absolute location) of the dtml-method that is rendering the links. So: even if I am viewing http://www.host1/News, I want to know in the dtml method making up the the navigation bar that it is in http://www.host1/nav_bar. Is there a dtml-var that points to the current method? Rob -- ===== rob@hooft.net http://www.hooft.net/people/rob/ ===== ===== R&D, Nonius BV, Delft http://www.nonius.nl/ ===== ===== PGPid 0xFA19277D ========================== Use Linux! =========
participants (2)
-
Evan Simpson -
rob@hooft.net