version 1.220, 2007/02/21 21:01:59
|
version 1.221, 2007/03/02 23:18:19
|
Line 410 sub urlfixup {
|
Line 410 sub urlfixup {
|
#internal document links need no fixing |
#internal document links need no fixing |
if ($url =~ /^\#/) { return $url; } |
if ($url =~ /^\#/) { return $url; } |
my ($host)=($url=~/(?:(?:http|https|ftp)\:\/\/)*([^\/]+)/); |
my ($host)=($url=~/(?:(?:http|https|ftp)\:\/\/)*([^\/]+)/); |
foreach (values %Apache::lonnet::hostname) { |
my %all_hostnames = &Apache::lonnet::all_hostnames(); |
if ($_ eq $host) { |
foreach my $hostname (values(%all_hostnames)) { |
|
if ($hostname eq $host) { |
$url=~s/^(?:http|https|ftp)\:\/\///; |
$url=~s/^(?:http|https|ftp)\:\/\///; |
$url=~s/^$host//; |
$url=~s/^\Q$host\E//; |
} |
} |
} |
} |
if ($url=~/^(?:http|https|ftp)\:\/\//) { return $url; } |
if ($url=~/^(?:http|https|ftp)\:\/\//) { return $url; } |