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,
}
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;
$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';