Joy,

J. Peng wrote:
> I'm still confused why we need a path_info for the additional info to
> CGI/modperl scripts?
> Generally under CGI we say x.cgi?key=value to pass arguments, under
> modperl handler we say /myHandler/?key=value to do it, or using POST
> method.
> Under what case we use path_info?
>


How about this for an explanation. In the first scenario with the ?,
you are passing arguments explicitly using key/value pairs as if it was
part of the URL sent by the web browser. In the second scenario,
nothing is being passed as key/value pairs. Instead, the server
searches up/down the directory hierarchy until it finds a match and
everything after the match becomes the argument.

In the first scenario when you are splitting the path into key/value,
you need to know where to split it. How? Perhaps by doing a file test
with each split yourself? In the second case, you don't need to worry
about it.

Not a very technical answer, but maybe an easy way of thinking of
things. The second scenario also makes it possible for Google, etc. to
index your web pages since it is a "real" URL. In the first case, it is
possible, but not as straight-forward.

Ray