<%doc> Login Page <%attr> title => 'Netdot Login' <%init> my $message; my $netdot_path = $r->dir_config('NetdotPath'); my $main_page = $netdot_path . "index.html"; my $redirect_path = $main_page; my $submit_target = $netdot_path . "NetdotLogin"; # Unless they requested the login page directly while not logged in # (in which case prev isn't defined) they will have probably been # attempting to do something else. We try to let them continue doing it. if (defined $r->prev) { #$message = $r->prev->subprocess_env('AuthCookieReason') If they #really were just logging in they probably don't want to continue #to login ad nauseum. Also, logging in to logout page redirects to #index. unless ($r->prev->uri =~ m{/log(in|out).html} || $r->prev->uri =~ /NetdotLogin/ ) { $redirect_path = $r->prev->uri . ( $r->prev->args ? "?" . $r->prev->args : ""); } # We're assuming that NetdotPath contains a '/' at the end # but the URI in the query may or may not have it, so we try to catch that here my $path_wo_slash = $netdot_path; $path_wo_slash =~ s/\/$//; if ( $r->prev->uri eq $path_wo_slash ){ $redirect_path = $path_wo_slash . '/' . ( $r->prev->args ? "?" . $r->prev->args : ""); } }
Please enter your login and password to authenticate.

Login:

Password:

Remember me: