Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

htaccess - password prompt every time a page is loaded

Status
Not open for further replies.

csbdeady

Programmer
May 18, 2002
119
GB
Hi there

I've a weird problem with .htaccess - I've set up a protected directory: mysite.com/subdir/

Within this are three files : a.html , b.html and .htaccess

If I go to mysite.com/subdir/a.html I get the login prompt correctly. I enter the correct username and password and am let into the site - a.html is displayed.

If I now go to b.html I get the login prompt again.

How do I "set" htaccess (or whatever is causing this) to only ask me to login once for every file in /subdir/ ?

Thanks!
-Colin
 
oh perhaps I should also say that I'm using .php files not .html in case it makes a difference.

My .htaccess is:

<Limit GET>
AuthUserFile /.../.htpass
AuthGroupFile /dev/null
AuthName &quot;SHECANe&quot;
AuthType Basic
require valid-user basingstoke
require valid-user easthamp
</Limit>

I'm not sure why but I had to specify the names of the users individually in separate require lines - without them I couldn't log in.
 
Hi mate,

The most likely reason for this is because you have all the attributes within the <Limit> </Limit> containers.

The only ones that should be in that directive is the require lines.


AuthUserFile /.../.htpass
AuthGroupFile /dev/null
AuthName &quot;SHECANe&quot;
AuthType Basic

<Limit GET>
require valid-user basingstoke
require valid-user easthamp
</Limit>


Hope this helps Wullie

sales@freshlookdesign.co.uk

The pessimist complains about the wind. The optimist expects it to change. The leader adjusts the sails. - John Maxwell
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top