modperl bootstrap
[www.jankratochvil.net.git] / redirect.pl
similarity index 79%
rename from project/checkstatic/index.html.pl
rename to redirect.pl
index a291c91..97a8cfb 100755 (executable)
@@ -1,7 +1,7 @@
 #! /usr/bin/perl
 # 
 # $Id$
-# Main page of 'My::Project::checkstatic'
+# URL redirector of &My::Web::a_href Perl template.
 # Copyright (C) 2003 Jan Kratochvil <project-www.jankratochvil.net@jankratochvil.net>
 # 
 # This program is free software; you can redistribute it and/or modify
@@ -26,11 +26,14 @@ use strict;
 use warnings;
 
 use My::Web;
-use project::checkstatic::ListItem;
+use Apache::Constants qw(MOVED);
 
 
-My::Web->init_project(
-               "ListItem"=>\%My::Project::checkstatic::ListItem,
+my $W=My::Web->init(
+               "header_only"=>1,
+               "args_check"=>{
+                               "location"=>'^\w+://',
+                               },
                );
-
-My::Web->footer();
+$W->{"r"}->status(MOVED);
+$W->{"r"}->header_out("Location"=>$W->{"args"}{"location"});