in reply to Re^2: Please explain this url
in thread Please explain this url

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__