Don't forget (depending on your config) your mod_perl handler will be
called twice, once to handle the original request and once to handle the
subrequest, so in your handler you should return
Apache2::Const::DECLINED unless the URI is in the right format.
Why not forget the rewriting and just use a regex match in your handler
to pull out the right bits of the uri?
Or do your own mod_rewrite in a handler:
if($r->uri()=~/^\/(\S+)\/(\S+)\/(\S+)$/){
$r->internal_redirect("/$1/$3?id=$2");
return Apache2::Const::OK;
}
hope this helps,
John
Jonathan Vanasco wrote:
currently:
mod_rewrite turns:
/a/b/c
into:
a/c?id=b
/a/ is its own <location> container
problem
$ApacheRequestRec->location = /a/
$ApacheRequest->path_info() = /
$ApacheRequest->path_info( $path_info ) = /
$ApacheRequest->uri() = /a/b/c/
$ApacheRequest->unparsed_uri() = /a/b/c
explained:
all of the $r operations show the original request
i need to access what mod_rewrite mapped me to - and i can't find
anything that does that
i know i must be missing something obvious - can someone suggest
something?