Re: easy question

by "Chris Walker" <dev(at)rockfordweb.com>

 Date:  Fri, 9 Mar 2001 00:59:50 -0600
 To:  <hwg-servers(at)hwg.org>
 References:  jbarchuk
  todo: View Thread, Original

On the subject of file paths, I strongly, strongly recommend doing one of
two things..

1. Reference everything from your documentroot (/)

2. Create symbolic links (assuming your OS can do the job) in your
documentroot directory to commonly used code..

Using reletive paths in a web site can be just about as painful as using
them in compiled software.. Move the executable (in this case the web site
layout) and your toast.. Having inherited and moved reletive path-based
sites, I deeply appreciate referncing everything from the document root,
since it can be changed from the server config..

The problem you mention below would not have been an issue in the first
place if your site used one of the above methods..

Me, I use PHP, so everything, including paths, is a "constant" declared in
my globally included script..

Hope that gives you some ideas
Chris walker

> > i created a subdirectory below my documentroot directory and moved some
> > html files into it.  prior to moving to the subdirectory, the tag
> > 'action=cgi-bin/program' was working fine.  how do i reference the
cgi-bin
> > programs from the subdirectory?
>
> action=../cgi-bin/program
>
> The .. means 'go up one level in the directory tree'.
>
> To go up and then back down from deeper levels use ../../../etc.
>
> BTW even from the root directory it is often a good idea to use
> action=./cgi-bin/program which means 'from this starting point look at
> cgi-bin/etc/'. It gives the server a head start in figuring out where to
> look for a file, meaning instead of thinking about it it knows to just
> 'start here'.
>
> Have a :) day!
>
> jb
>
> --
> jim barchuk
> jb(at)jbarchuk.com
>
>

HWG: hwg-servers mailing list archives, maintained by Webmasters @ IWA