Jump to content

Recommended Posts

Posted

Greetings,

I have a web protected directory, call it dir. I have defined a subdomain that points to this directory, call it subdomain. I am prompted twice for the login information if I access this directory using the following addresses:

subdomain.****

****/dir

Whereas I get prompted only once for the login information if I use the following address:

www.****/dir

 

My .htaccess file defines

>AuthName www.****

 

I see that this issue was discussed in this forum here. Does anyone know how to solve this one? Is there some modification to the .htaccess file that would work?

 

Regards,

Tasha

 

PS Although I haven't found a solution yet, I found this explanation that may be the cause of my problem in a How To Guide at apache.org

 

Why does it sometimes ask me for my password twice?

When entering a password-protected web site for the first time, you will occasionally notice that you are asked for your password twice. This may happen immediately after you entered the password the first time, or it may happen when you click on the first link after authenticating the first time.

 

This happens for a very simple, but nonetheless confusing, reason, again having to do with the way that the browser caches the login information.

 

Login information is stored on the browser based on the authentication realm, specified by the AuthName directive, and by the server name. In this way, the browser can distinguish between the Private authentication realm on one site and on another. So, if you go to a site using one name for the server, and internal links on the server refer to that server by a different name, the browser has no way to know that they are in fact the same server.

 

For example, if you were to visit the URL http://example.com/private/, which required authentication, your browser would remember the supplied username and password, associated with the hostname example.com. If, by virtue of an internal redirect, or fully-qualified HTML links in pages, you are then sent to the URL http://www.example.com/private/, even though this is really exactly the same URL, the browser does not know this for sure, and is forced to request the authentication information again, since example.com and www.example.com are not exactly the same hostname. Your browser has no particular way to know that these are the same web site.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...