That's funny, because until a few weeks ago I worked with Rusty
(author of Scoop) :) And previous versions of Scoop were handling it
the way Drew mentioned, with an 'index.pl'.
Another alternative (which I prefer) has been discussed previously on
this list. Taking something like:
http://.../User/display/?user_id=7162
or:
http://.../News/edit/?news_id=9182
The handler specified in the <Location /> configuration takes the
request, breaks up the path info, looks at the first entry and maps it
to a particular module. The second item is normally a subroutine to
call, although that module can map it to whatever it wishes. (There
are, of course, mechanisms for ensuring that 'private' routines cannot
be called from the outside world.)
So the first will map 'User' to a module and call the ->display()
method; the second maps 'News' to a module and calls the ->edit()
method. GET (or POST) parameters are handled via normal means.
Works swimmingly so far :)
Chris
* David Veatch ([EMAIL PROTECTED]) [000710 11:10]:
> At 10:33 AM 7/10/00 -0400, Drew Taylor wrote:
> >Chris Winters wrote:
> >>
> >> This always worked for me:
> >>
> >> <Location />
> >> SetHandler perl-script
> >> PerlHandler ModuleName
> >> </Location>
> >Well, seems like I tried that, and then it ALWAYS used that handler. I
> >also have other handlers, and I _think_ the setup above overrode the
> >others. I'll give it a try again now. OK, I just tried it, and it
> >overrode everything else. :-(
>
> I'm doing this... in a way inspired by Scoop (scoop.kuro5hin.org). The
> handler accepts different query-string arguments to do different things...
>
> if ($query_string_arg eq "this') {
> do that stuff;
> elsif ($query_string_arg eq "that") {
> do this other stuff;
> } elsif ...
>
> Anything that doesn't match what I'm explicitly looking for will go back to
> the default behavior.
>
> In other words, the handler handles it, and Apache just sends it to the
> handler.
--
Chris Winters
Internet Developer INTES Networking
[EMAIL PROTECTED] http://www.intes.net/
Integrated hardware/software solutions to make the Internet work for you.