if ($keyword =~ /^$url_pattern/) {
$url = $keyword;
# rewrite to current
- if ($url =~ /^(http:\/\/.*?postgresql\.org\/docs\/)[0-9\.]+(\/.*)$/i) {
- $url = $1 . "current" . $2;
+ if ($url =~ /^https?:\/\/(.*?postgresql\.org\/docs\/)[0-9\.]+(\/.*)$/i) {
+ $url = 'https://' . $1 . "current" . $2;
}
# rewrite to static
- if ($url =~ /^(http:\/\/\/\/.*?postgresql\.org\/docs\/current\/)interactive(\/.*)$/i) {
- $url = $1 . "static" . $2;
+ if ($url =~ /^https?:\/\/(.*?postgresql\.org\/docs\/current\/)interactive(\/.*)$/i) {
+ $url = 'https://' . $1 . "static" . $2;
}
last;
}