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/;
Re: anyone know a trick with displaying 401 error messages for top level protected sites?
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/;
RE: anyone know a trick with displaying 401 error messages for top level protected sites?
Try the following: ErrorDocument 401 Error Encountered During Login. Contact DJ. ErrorDocument optionally takes a string defined by text instead of a document URI. I've found this tend to work smoothly where specifying an actual page wont. -Brendan -Original Message- From: DJ (David J Radunz) Sent: Mon 12/10/2001 22:36 To: [EMAIL PROTECTED] Cc: Subject: anyone know a trick with displaying 401 error messages for top level protected sites? Greetings, Ive written a module to hanlde error messages, it works fine except when its used to handle a top level authentication.. and then it doesnt display the page. 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. Im wondering if there is anyway around this thou? DJ winmail.dat