Discussion Locked

Web page password protection.

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Hi I need help with a small problem.
I am using wirex to hold my websites.
when I go to http://www.mywebsite/usage. it was open to the public which I don't want. So I created a .htaccess and now it ask me for my password. I had to enter my user name and password twice to see my usage folder how do I fix this issue very irritating to enter password and user twice. I tried everything on my knowledge that's why I need your brain.

wirex it is base on Redhat 7.

come on linux gurus please help.

Remember I can go in to the folder but I have to enter username and password twice.

Thanks in advance.

Rafael Jimenez
rafael@mrvcs.com

5 replies

by jezzabel

When you are authenticated by a web site, the browser assigns the credentials to a "protection space", as defined in RFC2617. The protection space is made up of the realm (the name of the challenge) and the canonical root URL of the web site. Whenever you revisit the same realm in a browser session, it will reuse the credentials without asking you again.

Some web sites will redirect the browser to another name for the same site. For example, if you connect to http://www.slashdot.org/ it redirects you to http://slashdot.org/. If the site is password-protected, you will be prompted for a password for the first URL, and once again for the second URL. Try bookmarking the site after you've authenticated twice, then go to the bookmarked location.

by rafael

This is an easy solution please be more especific How do you fix the redirection issue and if you have the answer for this and if it works the points are yours.
Thank you.

by jezzabel

The redirection can take place a number of ways. I'd have to look at the httpd.conf file to know for sure. However, if there's a ServerAlias directive, that could be a cause.

Another issue that's common is for a web site to have self-referencing links, but where the links refer to the real name instead of the alias (or vice versa). eg, If the authenticated page has an image on it reference by absolute URL, the URL may not match the one for the main page. In these cases, rejecting the second challenge causes the page to be rendered without the image(s).

This discussion is closed to new replies.