Linked Questions

Popular Questions

.htaccess keeps asking password at every request

Asked by At

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:


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?

Related Questions