[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl] RE: [MacPerl-WebCGI] Bingo





> However, I don't understand the difference in reference. My cursory 
> understanding is that using "cgi-bin/hello.cgi" means to look within 
> the current directory for "cgi-bin" whereas, using 
> "/cgi-bin/hello.cgi" suggests to me to look one level deeper?
> 
> 
Actually "cgi-bin/hello.cgi" would look for a directory named "cgi-bin"
within the directory of your html file.

"/cgi-bin/hello.cgi" would be looking for it based off the root of your
site. Not "one level deeper."

If your url is "http://www.foo.com/tedd/stuff/file.html" and you called
"cgi-bin/hello.cgi"
it would look for "http://www.foo.com/tedd/stuff/cgi-bin/hello.cgi"

If your url is "http://www.foo.com/tedd/stuff/file.html" and you called
"/cgi-bin/hello.cgi"
it would look for "http://www.foo.com/cgi-bin/hello.cgi"

Does that make sense? The second one, that starts with a "/" in front of
"cgi-bin" forces it to look to the root directory of your webserver.

If the "cgi-bin" directory was located inside of the "tedd" directory, you'd
need to use either "/tedd/cgi-bin/hello.cgi" (root relative) or
"../cgi-bin/hello.cgi" (relative) if your file was at
"http://www.foo.com/tedd/stuff/file.html"

This is basic html stuff, not having anything to do with perl. The same goes
for image directories. html files, etc...


Pete

# ===== Want to unsubscribe from this list?
# ===== Send mail with body "unsubscribe" to macperl-request@macperl.org