From: Emil Williams Date: Sun, 18 May 2025 01:09:41 +0000 (+0000) Subject: -- X-Git-Url: https://git.xolatile.top/?a=commitdiff_plain;h=9a1f4ff467295c9fac193191e625ba283b740ac0;p=emil-3chen.org.git -- --- diff --git a/perl/Triple.pm b/perl/Triple.pm index 7a97df2..9857c0b 100644 --- a/perl/Triple.pm +++ b/perl/Triple.pm @@ -126,6 +126,13 @@ sub Triple::main { $location = $vars->{"uri"}; } + my @search = @{$page{$vars->{uri}}}; + if ($search[PAGE_TYPE] == REDIRECT_PAGE) { + # $vars->{uri} = $search[PAGE_TO]; + $status = '301 Moved Permanently'; + $location = $search[PAGE_TO]; + } + if ($location) { print $cgi->header( -Content_Type => 'text/html', @@ -142,10 +149,6 @@ sub Triple::main { next if $status ne ''; - { - my @search = @{$page{$vars->{uri}}}; - $vars->{uri} = $search[PAGE_TO] if $search[PAGE_TYPE] == REDIRECT_PAGE; - } my $page = $static{$vars->{uri}}; if (not $page) { if (@{$page{$vars->{uri}}}[PAGE_TO]) {