]> mj.ucw.cz Git - pciids.git/commitdiff
Serve robots.txt and index statically
authorMichal Vaner <vorner@ucw.cz>
Tue, 15 Jul 2008 08:44:28 +0000 (10:44 +0200)
committerMichal Vaner <vorner@ucw.cz>
Tue, 15 Jul 2008 08:44:28 +0000 (10:44 +0200)
PciIds/Html/Handler.pm

index 4a07f25940bddc86504a505ea462410229ca860a..9882f76fe3b4ae8272564906bc88b44f4a606872 100644 (file)
@@ -56,7 +56,8 @@ my %handlers = (
 
 sub handler( $$ ) {
        my( $req, $hasSSL ) = @_;
-       return DECLINED if( $req->uri() =~ /^\/(static)\// );
+       return HTTPRedirect( $req, $req->uri()."index.html" ) if( $req->uri() eq '/' );
+       return DECLINED if( $req->uri() =~ /^\/((static)\/|robots.txt|index.html)/ );
        my $args = parseArgs( $req->args() );
        my $action = $args->{'action'};
        $action = '' unless( defined $action );