On 4/2/07, Adam Prime x443 <[EMAIL PROTECTED]> wrote:

you want:

sub handler {
    my $r = shift;
    my $uri = $r->uri;
    return DECLINED if $url =~ /^\/gallery;

    # not a gallery request... do some stuff and return an XML document

}

I don't think it's that simple.  He must have already set perl-script
as the handler for this location, so it won't just use the default if
you decline.

A good way to do this is shown here:
http://perl.apache.org/docs/1.0/guide/config.html#Overriding_E_lt_LocationE_gt__Setting_in__Sub_Location_

Basically, you make a Location block like this:

<Location "/gallery">
 SetHandler default-handler
</Location>

Another approach would be to change the locations so they don't
overlap, e.g. put the XML stuff at /xml or use FilesMatch *.xml
instead of /.  (And that LocationMatch / isn't anchored to the
beginning of the URL, is it?  It's going to match any URL with a /
anywhere in it.)

- Perrin

Reply via email to