On Wed, Oct 06, 2004 at 06:30:39PM +0800, Greg Matheson wrote:
> > http://www.kwiki.org/?NavigationRequests into one like
> > http://www.kwiki.org/NavigationRequests then?
>
> Sorry, I read it as something I would like: more navigation links
> on pages so you don't have to use Search so much.
>
> Doesn't PATH_INFO return what comes after the question mark?
I hope you don't get me wrong, but please read the docs.
Let's say you have a CGI handler for files named .cgi in a certain
location /foo/ and let's say there's a script test.cgi (a regular file)
http://localhost/foo/test.cgi
PATH_INFO is ""
http://localhost/foo/test.cgi/bar
PATH_INFO is "/bar"
SCRIPT_NAME is "/foo/test.cgi"
http://localhost/foo/test.cgi/bar?quux
PATH_INFO is "/bar"
SCRIPT_NAME is "/foo/test.cgi"
QUERY_STRING is "quux"
Why is that? Because Apache finds a script test.cgi there. The URL is
traversed left to right, and the longest match wins. Here the longest
match is "/foo/test.cgi"
Now make "test.cgi" the index for that location and you have what you
are looking for.
> How does Apache tell the difference between a static html file named
> NavigationRequests and a kwiki page called NavigationRequests?
NavigationRequests does not exist in the filesystem, therefore the best
match it the index.cgi script with the corresponding path_info.
> The reason for the question mark in
> http://www.kwiki.org/?NavigationRequests is because it is really
> http://www.kwiki.org/index.cgi?NavigationRequests.
Look for "MultiViews" in the docs (IIRC all the relevant stuff is
mentioned there directly, or referenced from there)
> Apache knows that the http://www.kwiki.org/ is really
> http://www.kwiki.org/index.cgi
It tries several indexes for "/" if it's so configured.
Marcelo