WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Using .htaccess for protection, but asked for password twice. (11 posts)

  1. snoogly
    Member
    Posted 8 years ago #

    I am using the .htaccess file to password protect the entire WP site. The htaccess file is located in the root WP directory, and for some reason visitors are asked twice, right after another, to enter the login name and password.

    I often use htaccess for password protection, but this is the first time I have experienced this behaviour. Is it a uniquely WP thing, or is there something wrong with my setup?

    On closer inspection I see that the first time I am asked for the password for http://sitename.com, and the second time for http://www.sitename.com

    I have no idea why this is the case!

  2. administrator
    Member
    Posted 8 years ago #

    no the problem is that your ****** . htaccess for pass prot is the ******** i have ever heard.

    if i ever hear this again i am going to ban you from the wordpress forums

    [Moderated - hey 'administrator', it's not you carrying the big stick around here. I'll type this slowly just for you:
    Get Lost.]

  3. snoogly
    Member
    Posted 8 years ago #

    What is the problem with htaccess? It's a simple way to protect a WP site which doesn't require users to log in.

  4. Snoogly, I don't know who "administrator" is, but he holds no position of authority in these forums. He will not be banning you, or anyone else. But, if his behavior continues, the real administrators will ban both his username and IP.

    As for your issue, a link to your blog with a temporary password would help us to troubleshoot it. If that is not possible, please let us know.

  5. snoogly
    Member
    Posted 8 years ago #

    Thanks for that reassurance! I did think his response was a bit ... over the top! I am waiting for my hosting company to get back to me, as it may a problem at their end. If I don't hear anything in a few hours I will get back to you.

    Thanks again!

  6. snoogly
    Member
    Posted 8 years ago #

    All is well now. With the help of my hosting company (Dreamhost) I changed a setting in the CP to automatically redirect any 'http://www......' arrivals at the site to 'http://...' address. The htacces file was seeing 'http://www.sitename.com' and 'http://sitename.com' as two different addresses, and asked for a password to access each of them.

    Though WPress is not to blame for this, I have only ever had such an experience with a WPress site.

  7. questioner
    Member
    Posted 8 years ago #

    I just had the same problem with my new site and found these comments helpful. If I use the following link I can get there with only one login. http://tomballcountryclub.org/forum/index.php
    However, if I either leave off the "index.php" or inlude the "www", I have to login twice.

    This has got to be a WordPress problem. If I specifically reference another file such as readme.html even using the "www" I get to it with only one login.

  8. questioner
    Member
    Posted 8 years ago #

    I spoke too soon. I get asked for another login when I select another page on the site. It then inlvudes the "www". I guess I'll have to work with the host provider.

  9. questioner
    Member
    Posted 8 years ago #

    I now have this working properly by doing the following:
    1. Link to the forum: http://tomballcountryclub.org/forum/index.php (include the index.php and leave off the www.)
    2. In the WordPress Options for Blog address (URI) specify http://tomballcountryclub.org/forum/index.php (include the index.php and leave off the www.)

  10. redetiquette
    Member
    Posted 8 years ago #

    If anybody's still interested, try setting up a redirect with the trailing slash. (redirect from http://yoursite.com/protected_directory to http://yoursite.com/protected_directory/). Hope it helps.

  11. VaamYob
    Member
    Posted 8 years ago #

    The problem is really with http authentication.
    When you request http://domain.com and provide a userid/password it's for that url only.
    http://joe.domain.com is treated as something different and thus requiring a new login.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.