Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
.htacess login & 401 Problems
Old 01-24-2007, 05:37 AM .htacess login & 401 Problems
tuestunim's Avatar
Experienced Talker

Posts: 41
Name: Scott Brown
Location: Huddersfield, UK
Trades: 0
Hi,

I've made a site password protected but if the user hits cancel on the password dialog box, I want to redirect them to my customized 401 page. Here's me .htaccess file:

ErrorDocument 401 /error401.html

AuthUserFile /web/sites/10/phem2004/www.aquarline.co.uk/.htpasswd
AuthGroupFile /dev/null
AuthName EnterPassword
AuthType Basic
<Limit GET> require user admin require user customer</Limit>


Apparently, an error is found while processing the ErrorDocument page.

Anyone see a glaring error there? It's the first time I've set something like this up so it's a new one on me!

Cheers in advance,

Scott.
tuestunim is offline
Reply With Quote
View Public Profile Visit tuestunim's homepage!
 
 
Register now for full access!
Old 01-24-2007, 06:32 AM Re: .htacess login & 401 Problems
RanaD's Avatar
Super Talker

Posts: 139
Name: David
Trades: 0
The only glaring problem I can see, is that you are trying to load a protected file (your custom error document, as it is part of the protected site), when login fails.

Which wouldn't work, because if you can't log in, obviously you can't see a protected page...

Possible solution? Remove protection from the main folder, and move everything you want to protect to a subfolder, and protect that. You can have an index.html in your root, redirecting to the protected folder (or change the main page of your site in .htaccess to point to index.html in the protected folder)

Observation: Not a good idea to put .htpasswd in your root. I would put it in /web/sites/10/phem2004/secure/.htpasswd
RanaD is offline
Reply With Quote
View Public Profile
 
Old 01-24-2007, 06:33 AM Re: .htacess login & 401 Problems
tuestunim's Avatar
Experienced Talker

Posts: 41
Name: Scott Brown
Location: Huddersfield, UK
Trades: 0
Well that makes sense to me now. Why the hell couldn't I see that?! Hehe, never mind.

Thanks a lot for your help.
tuestunim is offline
Reply With Quote
View Public Profile Visit tuestunim's homepage!
 
Old 01-24-2007, 01:14 PM Re: .htacess login & 401 Problems
RanaD's Avatar
Super Talker

Posts: 139
Name: David
Trades: 0
You're most welcome
RanaD is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to .htacess login & 401 Problems
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.20614 seconds with 12 queries