I am writing a module that is supposed to do two things:

A request is made in the form of www.xxx.yyy/auth?k=lksdjflksjfdlkjdsf
where auth is handled via a <Location> directive.  This module looks at
the query string, queries a database and does one of two things.

1) If the db query returns foo.  I need to rewrite the request into:
        www.xxx.yyy/zzz.  This needs to be a post:
$req=HTTP::Request->new(POST=>'http://www.xxx.yyy/zzz',[var1=>'val1',var2='val2']);
Then the server processes the request and responds to the client all in
one request phase.


2) If the query returns bar, return Declined.

The Declined is quite easy, but the rewrite is not so clear.  All I have
seen of rewrites are pattern matching with mod_rewrite.

So, can I do this in one request phase, and how do I respecificy the uri
and continue down the line?  Which apache handler do I use, and is it as
easy as just grabbing the request object, and jamming in a new uri?

Any references or documents are very welcome.

Thanks!

David

Reply via email to