sub handler( $$ ) {
my( $req, $hasSSL ) = @_;
my $args = parseArgs( $req->args() );
- return HTTPRedirect( $req, $req->uri()."index.html" ) if( $req->uri() eq '/' && ( !defined $args->{'action'} || $args->{'action'} ne 'help' ) );
+ return HTTPRedirect( $req, protoName( $hasSSL ).'://'.$req->hostname().'/index.html' ) if( $req->uri() eq '/' && ( !defined $args->{'action'} || $args->{'action'} ne 'help' ) );
return DECLINED if( $req->uri() =~ /^\/((static)\/|robots.txt|index.html)/ );
my $action = $args->{'action'};
$action = '' unless( defined $action );
+ return HTTPRedirect( $req, protoName( $hasSSL ).'://'.$req->hostname().'/' ) if $req->uri() =~ /^\/(read|mods)\/?$/ && ( $action eq '' || $action eq 'list' );
my $method = $handlers{$req->method()};
return HTTP_METHOD_NOT_ALLOWED unless( defined $method );#Can't handle this method
my $sub = $method->{$action};