Hi, I'm trying to write my own translation handler.
The problem is that I'd like to map something like:
/foo.html to
/bar/servlet/test
where /bar/ is supposed to be handled by mod_jk
with something like:
<Location
"/bar">
JkUriSet worker ajp13:localhost:8009 </Location> When I tried to use mod_rewrite, the mapping took
effect, but then apache tried to find the file: "/bar/servlet/test"
rather than applying the <Location/> to send
to mod_jk.
I thought a mod_perl's PerlTransHandler will solve
this problem, with a simple:
package Urlmap;
use strict; use Apache2::Const -compile => qw(DECLINED); use Apache2::RequestRec; sub handler{
my $r = shift; my $uri = $r->uri; my $target = ""; if($uri =~ m|^/foo.html|i){ $r->uri("/bar/servlet/test"); } return
Apache2::Const::DECLINED;
} But it is giving me the same error, it returns a
404 file not found for "/bar/servlet/test".
So how can I change the URL, and still apply the
<Location/> directive afterwards?
Thanks.
Z.
|
- Help with PerlTransHandler Johnny Shz
- Re: Help with PerlTransHandler Torsten Foertsch