From: Michal Vaner Date: Tue, 15 Jul 2008 08:44:28 +0000 (+0200) Subject: Serve robots.txt and index statically X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=c7404b5d9d1b99c61a5436f3186d561d3ec55176;p=pciids.git Serve robots.txt and index statically --- diff --git a/PciIds/Html/Handler.pm b/PciIds/Html/Handler.pm index 4a07f25..9882f76 100644 --- a/PciIds/Html/Handler.pm +++ b/PciIds/Html/Handler.pm @@ -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 );