in reply to mod rewrite on mod perl handler skip trans handler phase

Why don't you just setup your handler in such a way to interrogate path_info - if there is path_info than use that , else look at the f_id param. It looks like you're using CGI::Application so something along the lines of:

sub do_profile { my $self = shift; my $cgi = $self->query(); my $f_id = $cgi->path_info() || $cgi->param( 'f_id' ); }

-derby

Replies are listed 'Best First'.
Re^2: mod rewrite on mod perl handler skip trans handler phase
by Anonymous Monk on Dec 19, 2006 at 17:18 UTC
    Can you please elaborate? If im not mistaken by using the using the path_info its just changing the way the param is passed to the module. It still doesnt solve the issue of being able to do something like:
    $base_url/$f_id example: myspace.com/$f_id
    and have it mapped to a certain perl handler (WEBCORE::Control::Profile->run). I'm not using CGI::Application, I actually have my own custom controller base class.

      Doh! Nevermind ... I thought you wanted the url to be /profile/<userid>

      In the case where you want url/<userid>, instead of mod_rewrite, you can push your location up:

      <Location /> SetHandler perl-script PerlResponseHandler WEBCORE::Control::Profile->run </Location>
      And then inspect the url - if it begins with profile, get the params, else break apart the url to get the userid.

      -derby