Geoffrey Young wrote:
> Grant McLean wrote:
> > Is there an easy way to get the absolute URI of the current request 
> > to use with Apache::URI->parse to translate a relative URI to 
> > absolute? 
> to generate a URI that points to the same server as the 
> current request it's best to use Apache::URI methods, which are
> pretty easy.
> 
>    my $uri = Apache::URI->parse($r);
>    $uri->path('/some/new/document.html');
>    my $absolute_uri = $uri->unparse;
> 
> note that calling path() (or any other method) is optional - 
> you don't need > to change anything in order to unparse() the 
> URI and get an absolute URI back.

Excellent, I knew there must be an easier way than what I was doing.

Regards
Grant

Reply via email to