In article <>, Jim Nagel
<> wrote:


>    2018.css   or ../2018.css   or ../../2018.css   etc


> Is there a way around this?  


I'm going to run away and hide after writing this:

1. Apart from files in the root, link them all with ../ and copy the css
file into every directory except the last in each branch using an obey
file which you keep in the root so you can update them if you make a
change to the master. Yeah, okay, those people screaming at the back,
maybe not if you have hundreds of directories, or

2. Re-organise - flatten - your site so that this isn't a problem, or 

3. Learn PHP. ;-)  This can read the current directory of the script/page
that's running and depending on the host it finds, sets either
"[nothing]" or "/[extra path]" as the value of a path which prefixes

A copy of the script:

Output of the script from my servers:

You'll need to change the value of the first variable to the first eight
letters of the string returned as "current path" from your local server
and also the second variable, which is the name of the local folder
containing you web site, assuming it's in your server's root. You can see is kept locally in a folder with the same name as its proper
site's URL.

Then replace your CSS sheet <link...> with everything between <head> and
</head> in the script on every page, and, oh, you'll also have to change
the name of your files from <name>/htm to <name>/php and make sure your
provider supports PHP and also that you're running a server with PHP
(such as WebJames+PHP). 

There. No changes to servers required.   ;-)


Tim Hill : : : :

Reply via email to