perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Frank Wiles <fr...@wiles.org>
Subject Re: retrieving the anchor tags in internal redirects
Date Fri, 21 Apr 2006 15:57:42 GMT
On Fri, 21 Apr 2006 11:49:19 -0400
Michael Peters <mpeters@plusthree.com> wrote:

> I have a application with mod_perl Authen/Authz handlers that will
> redirect to a login screen (via ErrorDocument) if the user is not
> logged in. Users follow links in emails and these links occasionally
> have anchors in them:
>   http://mysite.com/app?foo=bar#123
> 
> For the ErrorDocument 403 page that displays the login, it populates a
> 'back' param into a hidden form input so that after a login we can
> take the user to exactly where they want to go. Pretty standard
> stuff. To create this 'back' URL I use something like
> 
>   my $url = $r->prev->uri . '?' . $r->prev->args;
> 
> Which works fine except that the anchor info (#123) is lost. Is there
> anyway to get this from the original request's URL?

  I think you're looking for $r->prev->unparsed_uri 

 ---------------------------------
   Frank Wiles <frank@wiles.org>
   http://www.wiles.org
 ---------------------------------


Mime
View raw message