]> mj.ucw.cz Git - pciids.git/blobdiff - PciIds/Html/Handler.pm
Serve robots.txt and index statically
[pciids.git] / 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 );