Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Re: CGI Image on localhost

by eoin (Monk)
on Dec 21, 2003 at 23:14 UTC ( [id://316264]=note: print w/replies, xml ) Need Help??


in reply to Re: CGI Image on localhost
in thread CGI Image on localhost

Cheers thats what I was looking for, however will <quote>relative urls</quote> work under windows eviroments e.g. the windows servers??

Merry Christmas, Eoin...

If everything seems to be going well, you obviously don't know what the hell is going on.

Replies are listed 'Best First'.
Re: Re: Re: CGI Image on localhost
by exussum0 (Vicar) on Dec 21, 2003 at 23:23 UTC
    All in all, apache should do the right thing with slashes.

    Here's a long winded explanation on why it's fine...

    Let's put it this way. When you click on a link in a browser, it's supposed to issue an http request to the server based on the href. If the href has ../../../ etc, it will strip a few directories in the request. LIkewise if you do ../tmp/../tmp/../tmp. That's basic directory resolving in any os (replace /'s with \'s).

    So if you are at http://www/somedir/somedir2 and clicked a link http="../", you'll ask for http://www/somedir , if you clicked http="../somedir2/../somedir2" it should request http://www/somedir2/../somedir2. That is a guess. It may recompress it back to http://somedir/somedir2, but that's somethign to test and play with. not very useful :)

    Anyway, the browser should try and compress it somewhat, turning initial ../'s back into something shorter. The request is sent to the server and it can interpret it ANY WAY it wants. Doing something like /cgi-bin/this.cgi/that will pass that as an argument to your this.cgi script. This is a feature of the server 'cause it parses it that way. Well, at least apache did last i checked :) Anyway, last check, apache on windows should translate http://blah/this/../that/ int c:\whereyouinstalledapache\htdocs\this\..\that, which should turn into c:\whereyouinstalledapache\htdocs\that.


    Play that funky music white boy..
      ya wha??
      Took me a while but i think I get it now. Cheers.
      Nollaig Shona, Eoin...

      Nollaig shona duit.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://316264]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2024-04-23 21:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found