Reputation: 468
I have a staging website which I protected with a simple .htaccess file.
AuthType Basic
AuthName "Please login to access this page"
AuthUserFile /real/path/to/.htpasswd
Require valid-user
My .htpasswd is the following:
username:hashedpassword
When I login from desktop, it works fine (I tried in Firefox, Chrome and Safari).
But when I login from my iPhone (Firefox, Safari), it keeps on asking for login information at every request. It doesn't redirect me if I just dismiss it, but it still keeps on popping every time I make a new request.
I don't know if this is important, but I'm doing in on a subdomain. My .htaccess and .htpasswd files are in the subdirectory that my subdomain is pointing to.
What am I doing wrong?
Upvotes: 1
Views: 2001
Reputation: 11384
I have just come across this problem. After trying to figure it out for the last couple of days I have found out the source of the problem:
This prompt gets triggered when using AuthType Basic and whenever a 401 message is sent from the website.
Is it possible that you had a 401 HTTP status code message being sent from the server at each request?
Upvotes: 1