From: Emil Williams Date: Thu, 29 May 2025 22:50:06 +0000 (-0600) Subject: -- X-Git-Url: https://git.xolatile.top/?a=commitdiff_plain;h=75f9810bdbd5554f453e9e72ef70d424bc004e68;p=emil-3chen.org.git -- --- diff --git a/perl/Triple.pm b/perl/Triple.pm index 267d70a..acbfb1d 100644 --- a/perl/Triple.pm +++ b/perl/Triple.pm @@ -20,9 +20,9 @@ use Triple::Init; our $debug = 0; use constant { - STATIC_PAGE => 0, - DYNAMIC_PAGE => 1, - REDIRECT_PAGE => 2, + STATIC_PAGE => 0, + DYNAMIC_PAGE => 1, + REDIRECT_PAGE => 2, PAGE_TYPE => 0, PAGE_TT => 1, PAGE_TO => 1, @@ -95,8 +95,6 @@ sub Triple::main { } open(my $fh, '>', 'post_dump.txt') or die; - # print $fh $body; - # print $fh "\r\n"; my %post = parse_post($body); print $fh Dumper %post; close $fh; @@ -105,7 +103,8 @@ sub Triple::main { $location = $vars->{"uri"}; } - my @search = @{$page{$vars->{uri}}}; + my @search = @{$page{$vars->{uri}} || $page{$vars->{''}}}; + if ($search[PAGE_TYPE] == REDIRECT_PAGE) { # $vars->{uri} = $search[PAGE_TO]; $status = '301 Moved Permanently';