- or download this
!/usr/bin/env perl
...
my $uri = URI->new_abs( $rel_url, $abase );
print "absolute for base: $abase is\n\t".$uri."\n";
}
- or download this
absolute for base: http://server.com/123/xyz is
http://server.com/../../../../abc.html
...
http://server.com/../abc.html
absolute for base: http://server.com/1/2/3/4/5/ is
http://server.com/abc.html
- or download this
# Some servers erroneously return a relative URL for redirects,
# so make it absolute if it not already is.
...
$referral_uri = "" unless defined $referral_uri;
$referral_uri
= $HTTP::URI_CLASS->new($referral_uri, $base)->abs($base);