Alias /borg /home/vijay/src/atd/borg/html Options +Includes +Indexes +FollowSymlinks XBitHack on Order allow,deny Allow from all DirectoryIndex index.htm index.html index.php Options +ExecCGI +Includes +Indexes +FollowSymlinks XBitHack on Order allow,deny SetHandler cgi-script Allow from all PerlModule Apache::GateKeeper SetHandler perl-script PerlAccessHandler Apache::GateKeeper sub handler { my $r = shift; $r->subprocess_env(); my %cookies = fetch CGI::Cookie; loger(\%cookies); if (!defined($cookies{'U'})) { $r->headers_out->set( Location => 'https://login.iavian.com/login.php'); return Apache2::Const::REDIRECT; } return Apache2::Const::DECLINED; }