in reply to Please explain this url

A URL ends with a file name to be executed. And all the path before that is parent folders.
Huh? Why? That's not what the standard says, and that's not how most webservers are configured. It's a basic mistake to assume URLs contain file paths.

A webserver may do as it damn well pleases when asked for a certain URL. It's not violating any URL related RFC.

Replies are listed 'Best First'.
Re^2: Please explain this url
by manishrathi (Beadle) on Mar 22, 2010 at 01:11 UTC
    Okey , so in this case, how will the execution of files takes place ? when server encounters cgi_wrapper.cgi, will it execute it and then go to next executable file example_datacapture_callout.pl and then work on next file options.txt ?
    Does it mean that, we can execute multiple executable files at the same time (Like we are executing two files cgi_wrapper.cgi and example_datacapture_callout.pl in this case) ?
    Can we put more executable files in path like cgi_wrapper.cgi/example_datacapture_callout.pl/inline_callout.pl/options.txt ? Will all the files be executed in one callout command ?
    thanks
      when server encounters cgi_wrapper.cgi, will it execute it and then go to next executable file example_datacapture_callout.pl and then work on next file options.txt
      This is a Perl site. We cannot divine some magic that tells us what server you are using, and how it's configured.

      Please consult the vendor of your server, or the manual that came with it.

      On my server (some apache version), the data between the executable path and the first '?' are passed in the environment variable PATH_INFO. The script can then do whatever it wants with this information.

      Here's a little script that proved useful for debugging where different sorts of information is presented to a script

      #!/usr/bin/perl -T use strict; use warnings; use HTML::Entities; print <<EOF; Content-type: text/html <html><head> <title>Environment variables and POSTed data</title> </head> <body> <p> POSTed input data : <blockquote> EOF print encode_entities $_ while (<>); print <<EOF; </blockquote> </p> <form method="post" action="$ENV{SCRIPT_NAME}"> <input name="box1" value="value1"/> <input type="submit" value="Send some data"/> </form> <p> Environment: </p> <table border="1"> EOF foreach my $v (sort keys %ENV) { print qq.<tr><td>$v</td><td><tt>., encode_entities($ENV{$v}), qq.</tt></td></tr>\n.; } print <<EOF; </table> <p> source code for this page: <blockquote> EOF unless (seek DATA,0,0) { print "couldn't read myself\n" } else { print "<pre>"; print encode_entities $_ while (<DATA>); print "</pre>"; } print <<EOF; </blockquote> </p> </body> </html> EOF __DATA__