I see two ways of doing what you want. First, look in the archives for any
recent
mod_rewrite threads. They include the succesfully written mod_rewrite rules
that
take path information off the end of a string and place it in an environment
variable. However, I don't know much about mod_rewrite.
A simpler solution, but probably less op efficient, is to use a
PerlTransHandler.
The Trans stage is used for converting the incoming uri into a locally
meaningful
piece of data. This is covered extensively in the Eagle Book (Programming
Apache
Modules in Perl & C)
sub handler {
my $r = shift;
my @path = split(/\//,$r->uri());
shift @path; #the leading slash makes path[0] empty
# mess around with the end of path as you will here...
my @new_path = @path[0..2];
# Stick the data you want to save in pnotes, perhaps
$r->pnotes('MY_PATH_INFO' => $stuff);
$r->uri(join("/","",@new_path));
return DECLINED;
}
Have a happy,
-JoshNarins
PS How many people out there have one email address? :)