Works fantasticaly! thanks so much.
DJ ----- Original Message ----- From: "Rob Bloodgood" <[EMAIL PROTECTED]> To: "DJ (David J Radunz)" <[EMAIL PROTECTED]> Cc: "mod_perl" <[EMAIL PROTECTED]> Sent: Wednesday, December 12, 2001 6:09 AM Subject: RE: anyone know a trick with displaying 401 error messages for top level protected sites? > > > for example if the protected url was http://www.site.com/ the user > > would be redirected to http://www.site.com/error/401 for the error > > message.. and because its protected wouldnt display the custom error > > page instead displaying the following error "Additionally, a 401 > > Authorization Required error was encountered while trying to use an > > ErrorDocument to handle the request.". Which i can understand. > > > How about > Put your 401 html page into a directory like /error. > Set the PerlAuthenHandler for /error to Apache::Constants::OK: > > <Location /error> > AuthType Basic > PerlAuthenHandler Apache::Constants::OK > > # This 'require' is actually required. :-) > require valid-user > </Location> > > Do the same for the dir where any/all of its images are located > -- or -- > Put the images specific to the 401 handler in /error. > > That should do it. > (but I haven't tested it, so YMMV :-). > > > L8r, > Rob > > #!/usr/bin/perl -w > use Disclaimer qw/:standard/; > >