Protection Not Working Quite Right

Discussion in 'Setting-up protection' started by HRS, Aug 24, 2003.

  1. HRS

    HRS Guest

    Hi

    I'm using the free version of aMember (but will consider upgrading if I can get this to work.) I have followed the protection instructions from the on-line docs, but when I access the login.php and it redirects me to the protected page, I get the login box and enter my username and password, but it won't accept it. Another box comes up asking for the same info. 3 times and an error page comes up.

    My .htaccess file looks something like this:

    AuthType Basic
    AuthName "Members Only"
    AuthUserFile /home/sites/home/web/amember/data/.htpasswd
    AuthGroupFile /home/sites/home/web/amember/data/.htgroup
    Require group PRODUCT_5

    When I go to the login.php, it is redirecting me to a URL like this: http://username:password@www.mydomain.com/protected/protected_file.html

    Any idea what the problem may be?

    Thanks
  2. stewpot

    stewpot Guest

    Yep, exactly the same problem. Would love to know the solution for this too. (Don't want to just use the login page if i can help it)
  3. HRS

    HRS Guest

    Well I sort of got this working, I have one directory that is protected and works like it is supposed to. What I can't figure is why the other 2 are not working, it won't accept

    The working .htaccess file is like this:
    AuthType Basic
    AuthName "Members Only"
    AuthUserFile /home/sites/home/web/amember/data/.htpasswd
    AuthGroupFile /home/sites/home/web/amember/data/.htgroup
    Require group /college/

    In the other 2, the only thing that changes in the .htaccess is Require group line. I have /nfl/ and /combined/

    Why would it work on one and not the other two?

    Any answers are appreciated.
  4. abbeyvet

    abbeyvet New Member

    Joined:
    Feb 2, 2003
    Messages:
    135
    That does not look right.

    It should be something like your first one, the working one, and have the product that gives access to the directory there, not the directory.

    so if product 9 gives access to the directory /college/ it would read:

    Require group PRODUCT_9
  5. HRS

    HRS Guest

    It was not working with the PRODUCT_# either. Really not sure if it is my server or something else.
  6. tomarriola

    tomarriola Member

    Joined:
    Mar 29, 2003
    Messages:
    140
    .htaccess files like an extra line at the end. Be sure you have that.
    Tom
  7. HRS

    HRS Guest

    An extra line of just blank space?
  8. tomarriola

    tomarriola Member

    Joined:
    Mar 29, 2003
    Messages:
    140
    Press the return key at the end of the last line of text to start a new line.
    Tom
  9. stewpot

    stewpot Guest

    Nope... didn't work for me - the extra line thing, though i'll remember that one thanks :)

    I'm wondering if it might be a conflict with 'CPanel'. CPanel allows you to set up Protected directories... would it be interferring with the .htaccess files somehow?

    s
  10. stewpot

    stewpot Guest

    Alex? any ideas :)
  11. stewpot

    stewpot Guest

    Soooo Alex...

    If i were to puuuurchase the pro version, D'ya reckon you could overcome this problem I have with the pop up box not recognising the users and passwords then??

    In a nutshell... I give up!

    s :unsure: :wacko: :D
  12. alex-adm

    alex-adm Guest

    2all: please sorry for long delay with answering in the forum.

    Stewpot, could you please put your .htpasswd and .htaccess files here?
    I think your site is not live, so these files have no sensitive info yet.
  13. Guest

    Guest Guest

    .htaccess I have put in the folder(s) i want to protect


    AuthType Basic
    AuthName "Members Only"
    AuthUserFile /home/alexandr/public_html/amember/data/.htpassword
    AuthGroupFile /home/alexandr/public_html/amember/data/.htgroup

    require group PRODUCT_1
    ______________

    .htaccess I from data folder in amember


    AuthType Basic
    AuthName "Member Lists"
    AuthUserFile /home/alexandr/public_html/amember/data/.htpassword
    AuthGroupFile /home/alexandr/public_html/amember/data/.htgroup
    require group PRODUCT_1

    ______________

    .htpassword file from data folder in amember


    fred:909avCjhHD0s.
  14. stewpot

    stewpot Guest

    Yes that was me... forgot to Log in... doh
  15. alex-adm

    alex-adm Guest

    AuthUserFile /home/alexandr/public_html/amember/data/.htpassword
    ^^^^^^^^^^^ - it must be .htpasswd !

    I say again, please copy correct .htaccess file from aMember CP -> Info and some URLs

    Also, review your file amember/data/.htgroup and make sure group names in this file does match group you require in your .htaccess:
    (PRODUCT_1)
  16. stewpot

    stewpot Guest

    :rolleyes: :D ... thanks Alex. I must learn to read!

Share This Page