To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here
PHPBuilder.com  
 

 

Go Back   PHPBuilder.com > Misc Help > Linux/Unix Help

Linux/Unix Help Help with server-side Linux and Unix issues

Reply
 
Thread Tools Rate Thread Display Modes
Old 09-25-2002, 11:31 PM   #1
Ph0eniX
Senior Member
 
Join Date: Sep 2002
Location: NY[fucking]C
Posts: 148
cannot use a full URL in a 401 ErrorDocument directive --- ignoring

I'm trying to use custom error pages configured through .htaccess. 404 works just fine but when it hits 401 it displays the standard error page and logs the following in the error_log:

cannot use a full URL in a 401 ErrorDocument directive --- ignoring

I'm running Apache 1.3.9 on Solaris 9 (sun4u)
Any ideas?
Ph0eniX is offline   Reply With Quote
Old 09-26-2002, 12:09 PM   #2
dotwebbie
Expert at something . . .
 
Join Date: Aug 2002
Posts: 287
First, I'd upgrade. Second, do you mind posting a little bit of you .htaccess file?
dotwebbie is offline   Reply With Quote
Old 09-26-2002, 12:18 PM   #3
Ph0eniX
Senior Member
 
Join Date: Sep 2002
Location: NY[fucking]C
Posts: 148
You mean upgrade apache to v2? ...I'm reading that it's not very stable (working with PHP) on Solaris.

Here's what the .haccess file looks like:

AuthUserFile /usr/local/access/.pwdfile
AuthName "Secure Intranet"
ErrorDocument 401 http://192.168.2.1/err/401.html
ErrorDocument 404 http://192.168.2.1/err/404.html


AuthType Basic
<Limit GET POST PUT>
order deny,allow
require valid-user
allow from 192.168.199.
satisfy all
</Limit>
Ph0eniX is offline   Reply With Quote
Old 09-26-2002, 12:29 PM   #4
dotwebbie
Expert at something . . .
 
Join Date: Aug 2002
Posts: 287
Apache 1.3.26. stable, bugfixes, security fixes. Yeah, don't use Apache2.x unless it's a dev environment because you will get some of most incredible errors.

Okay. Why not use err/401.html instead?
dotwebbie is offline   Reply With Quote
Old 09-26-2002, 01:11 PM   #5
Ph0eniX
Senior Member
 
Join Date: Sep 2002
Location: NY[fucking]C
Posts: 148
Quote:
Originally posted by dotwebbie

Okay. Why not use err/401.html instead?
I did that and guess what:

[Thu Sep 26 12:08:52 2002] [notice] cannot use a full URL in a 401 ErrorDocument directive --- ignoring!

I figured maybe if I restart apache and try it again it will work but no dice. Still the same error even though I'm not using the full URL.
Ph0eniX is offline   Reply With Quote
Old 09-26-2002, 01:14 PM   #6
dotwebbie
Expert at something . . .
 
Join Date: Aug 2002
Posts: 287
Then my only guess is a bug in 1.3.9 . . .
dotwebbie is offline   Reply With Quote
Old 09-26-2002, 01:33 PM   #7
Ph0eniX
Senior Member
 
Join Date: Sep 2002
Location: NY[fucking]C
Posts: 148
Quote:
Originally posted by dotwebbie
Then my only guess is a bug in 1.3.9 . . .
I'm beginning to think so too. I even rebooted the system but that didn't fix it either.
Ph0eniX is offline   Reply With Quote
Old 01-05-2006, 01:10 PM   #8
Budreaux
Junior Member
 
Join Date: Jan 2006
Posts: 1
In case anyone else finds this thread and wonders if a resolution was ever found (like I did), here is some info from Apache (Core Features)

"In addition, if you use a remote URL in an ErrorDocument 401, the client will not know to prompt the user for a password since it will not receive the 401 status code. Therefore, if you use an "ErrorDocument 401" directive then it must refer to a local document."

Therefore, if you want to redirect a 401 error, you must use something like this in your .htaccess file:

ErrorDocument 401 /err401.html

You cannot use these:

ErrorDocument 401 http://www.someweb.com/err401.html
ErrorDocument 401 http://1.1.1.1/err401.html

Hope this helps.
Budreaux is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT -4. The time now is 11:30 PM.






Acceptable Use Policy

internet.comMediabistrojusttechjobs.comGraphics.com

WebMediaBrands Corporate Info


Advertise | Newsletters | Feedback | Submit News

Legal Notices | Licensing | Permissions | Privacy Policy


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.