Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 10 of 10
  1. #1
    New to the CF scene
    Join Date
    Aug 2006
    Location
    Upstate New York
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question about htaccess password protection

    First I should let you all know that I am pretty new at using htaccess so I am learning as I go.

    I am currently setting up a phpbb forum (which I have done several times) for a friend of mine who wants the whole forum protected with htaccess so that only people he wants can go to it. Yes I know that this is over kill and what not but I am trying to be accommodating . When I log into the protected area and then try to log into the forums I get the username and password prompt again. The people who will be using this are not that computer literate so having them do this login process once is asking alot as it is. Also I have noticed that clicking on a link within the forums, such as profile or logout, also pops the prompt up again. Is there a way to only have the prompt appear once? Or should I be doing this a different way?

    Thanks in advance for any light you may shed on this situation for me.

  • #2
    Senior Coder
    Join Date
    Jul 2005
    Location
    UK
    Posts
    1,051
    Thanks
    6
    Thanked 13 Times in 13 Posts
    Where have you placed the htaccess file, and what is in it?

  • #3
    New to the CF scene
    Join Date
    Aug 2006
    Location
    Upstate New York
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I placed the file in the main directory of the forum installation. The file is as follows:

    AuthType Basic

    AuthName "Members Only!"

    AuthUserFile "/home/***/.htpasswds/forum/passwd"


    require valid-user

  • #4
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    What host does your friend have and what package does he have?
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #5
    New to the CF scene
    Join Date
    Aug 2006
    Location
    Upstate New York
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    How is that info gonna help?

  • #6
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Because some hosts give their clients control panels that make password protecting a whole lot easier. It basically automates the process. CPanel being one of the most popular. Since you don't seem to know how to create the file yourself the control panel seems like the better option. Trust us, when we ask for something it does pertain to the question. I wouldn't ask something for no reason.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #7
    New to the CF scene
    Join Date
    Aug 2006
    Location
    Upstate New York
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    The info I posted as what was in the htaccess file was done via cpanel. I apologize for answering your question with a question.

  • #8
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Okay there are a few things you need to do before it actually works.
    1. Login to Cpanel
    2. Go to the Password Protection area in Cpanel.
    3. Should be a list of folders and what not. Click on the folder name in this case you want to protect the root so click on the one with just a '/' or 'forums' whichever you want to protect.
    4. Now on the next screen there should be a check box with some text next to it that says something like "Folder requires a password to access via http://", it may be a little different. Check this box then in the text input it wants a little title of the password prompt that comes up.
    5. Once you enter that name hit save.
    6. Once saved you can setup user names and passwords.
    7. Just remember the stuff needs to be saved before you are able to add user names and passwords.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #9
    New to the CF scene
    Join Date
    Aug 2006
    Location
    Upstate New York
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I already did all that. My problem is that once in the forums area, clicking on a link such as "Logon" or "Members" the username and password prompt pops up again. So my real dilemma is do I need to not protect the entire directory and just the index.php file or do I need to add some code so that the login prompt for htaccess only appears once. Also just to clear something up...The phpbb install is not in the root directory. It is simply in addition to what is already existing. The phpbb install is in a subdirectory named "forum". I have been reading some tutorials and I briefly saw something about protecting a subdomain, would I be better off setting this up there and protecting the subdomain?

    Thanks for all the help so far, I hope you all can help me figure this out because it is driving me nuts!

  • #10
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    You just need to put the .htaccess file in one directory. The directory with the forums. It seems like you may have created an htaccess file for all of the directories individually.
    ||||If you are getting paid to do a job, don't ask for help on it!||||


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •