pepsi_max2k
07-10-2007, 09:05 PM
Ok another menu related question... I'm coding a single menu bar, phping it into various documents in differing levels of subdirectories, some in ...co.uk/blog/, some in ...co.uk/crimea/pages/, ...co.uk/crimea/pages/info/, etc etc.
Using absolute urls would work fine wherever the page was, but that stops me being able to use multiple domain names for a single site, or at least until someone hits a link.
Problem is I'm not to sure if there's a way of using relative urls instead as the links will be the same regardless of what directory a page is in. eg, just using ../info/blah.html, will work fine if i'm in /page/somethingelse, but if i'm in /blog/wherever/ it won't work.
Only thing I can think of now is, hopefully, just adding ../../../../../../../ will take me to the root of the site from anywhere, ignoring any excess ../'s, then i can just add the path from the root after that. Or if there's a kinda way to use /public_html/crimea/pages/blah.html instead then that's great.
Any ideas what I should do? thanks.
Using absolute urls would work fine wherever the page was, but that stops me being able to use multiple domain names for a single site, or at least until someone hits a link.
Problem is I'm not to sure if there's a way of using relative urls instead as the links will be the same regardless of what directory a page is in. eg, just using ../info/blah.html, will work fine if i'm in /page/somethingelse, but if i'm in /blog/wherever/ it won't work.
Only thing I can think of now is, hopefully, just adding ../../../../../../../ will take me to the root of the site from anywhere, ignoring any excess ../'s, then i can just add the path from the root after that. Or if there's a kinda way to use /public_html/crimea/pages/blah.html instead then that's great.
Any ideas what I should do? thanks.