iEntry 10th Anniversary Forum Rules Search
WebProWorld
Register FAQ Calendar Mark Forums Read
Web Programming Discussion Forum Working with an API? Developing a plugin? Writing a Mod or script for your favorite blog, Web 2.0 site or Forum? Welcome.

Share Thread: & Tags

Share Thread:

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-16-2004, 09:49 PM
WebProWorld New Member
 
Join Date: Dec 2004
Posts: 19
StephenGarcia RepRank 0
Default Setting up customized error page with .htaccess protection

I am trying to set up the .htaccess authentication system such that a customized error page is displayed when an unauthorized user tries to access the protected directory.

Can the
Require Directive, Require Valid-User

and
Error Directive, ErrorDocument 401 /Error1.html

be used together in a single .htaccess file?

Also, when a wrong ID/PW combo is provided, the dialog box that asks the ID/PW pops up a total of 3 times before the canned 401 Error message (unauthorized access) gets displayed. How can I change setting so that the Error message gets displayed after the wrong user ID/PW is provided in the first instance itself?

Thanks.
Stephen
Reply With Quote
  #2 (permalink)  
Old 12-20-2004, 07:07 PM
WebProWorld Pro
 
Join Date: May 2004
Location: Austin, TX
Posts: 199
steve0 RepRank 0
Default

Make sure your error page is NOT in the protected directory.. (Is it at the root level?)


Make sure the server name used in the .htaccess file is the same as the ServerName used in the httpd.conf
(if you use the ServerAlias, the login box will resolve back to the ServerName)

Likely scenario..
Dialog 1 = initial request
Dialog 2 = Revolved to true ServerName
Dialog 3 = Second attempt for password
then Failure..loads standard 401
__________________
Hardcore Programming Solutions and Coffee Drinker
Reply With Quote
Reply

  WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



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



Search Engine Optimization by vBSEO 3.3.0