From c7404b5d9d1b99c61a5436f3186d561d3ec55176 Mon Sep 17 00:00:00 2001 From: Michal Vaner Date: Tue, 15 Jul 2008 10:44:28 +0200 Subject: [PATCH] Serve robots.txt and index statically --- PciIds/Html/Handler.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 ); -- 2.39.5