Try something like this ...

<Location />
  SetHandler YOURMODULE
</Location>

# everything you dont want to handle with your module
<Location /site>
 SetHandler none
</Location>

#...
<Location /robots.txt>
 SetHandler none
</Location>

----- Original Message ----- From: "Mike O'Leary" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, November 07, 2007 3:22 AM
Subject: Handler Problems


Hello,

I'm having some handler issues that I'm hoping someone can shed some light
on.  I am trying to have my own module handle most requests and have the
normal apache server handle the rest.  What would be ideal is if I could
somehow have the apache server handle all www.mysite.com/site/* urls and my
module handle everything else.  I am not sure of a way to do this in the
http.conf file.

Below is my current solution that doesn't quite work.  Thanks for any help
in advance!


In my http.conf file, I have a SetHandler line that globally sets my module
to handle all requests.  In my module I check to see if the URI request is
for static website content in which case I do this:

r->handler = "default-handler";
return DECLINED;

This works fine for the most part, but I have found two problems:

1) If someone requests www.mysite.com, whatever normal logic that is invoked to serve the index.html page is no longer active and I get the 404 page. I
have my own 404 page that is a perl script located in my cgi-bin.  I
actually get the 404 perl script in plain text as described in #2.

2) Any requests for cgi-bin content return the cgi scripts in plain text.
Not exactly what I was after.... :)


Reply via email to