Forum Moderators: phranque

Message Too Old, No Replies

AuthAuthoritative doesn't seem to work

Newbie needs help with AuthAuthoritative in .htaccess

         

calvinmicklefinger

7:24 pm on Apr 15, 2007 (gmt 0)

10+ Year Member



Hello,

I am trying to implement Basic Authorization on a Linux server and at the same time allow the user/visitor to navigate into sub-directories without being prompted to login a second or third time.

I have added "AuthAuthoritative Off" to my .htaccess file with no results. Here are the contents of my .htaccess file ...

AuthName "Password Protected Area"
AuthType Basic
AuthUserFile /usr/local/webpassword/wp002.dat
AuthAuthoritative Off
Require valid-user

I would appreciate any help and suggestion.

Thanks in advance,
Kirk

jdMorgan

9:47 pm on Apr 15, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Unless you've got a complex setup (as described in the AuthAuthoritative documentation) with multiple authenticating modules, then the default behaviour should be that once authenticated, a visitor should be able to browse at will throughout the entire Auth domain.

So, if that is the case (you've got a simple auth environment), then you might want to check for a few common problems, such as the auth domain not including the whole directory structure (because the auth is done at the wrong directory level (e.g. in a sibling directory to the navigation target, rather than its parent) and problems such as authenticating in example.com, and then trying to navigate to or within www.example.com -- an entirely different authentication domain.

Jim

g1smd

11:28 pm on Apr 15, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



The www vs. non-www problem is seen on a number of sites.

calvinmicklefinger

11:54 pm on Apr 15, 2007 (gmt 0)

10+ Year Member



That was it. PHP script coder was using it in his work. I removed from a page and it was cleared. I have asked him to remove any others.

Many thanks to both of you.

Kirk

g1smd

12:28 am on Apr 16, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



You should have a site-wide 301 redirect installed, from non-www to www, to stop this sort of thing from ever occurring.

It is just a couple of lines in the .htaccess file.