htaccess etc

Discussion in 'Installation' started by stallen, Jun 11, 2008.

  1. stallen

    stallen New Member

    Joined:
    Dec 17, 2005
    Messages:
    9
    Hi Guys,

    I am just in the process of configuring my site. I came across this code in the .htaccess section:

    HTPASSWD protect plugin

    Password protect directories with this plugin.
    It generates .htpasswd and .htgroup files in directory
    /mnt/target02/345709/www.viralert.com/web/content/amember/data. You should put the following code into
    directory you want to protect.

    If you have only one level of access, use the following .htaccess file:
    AuthType Basic AuthName "Members Only" AuthUserFile /mnt/target02/345709/www.viralert.com/web/content/amember/data/.htpasswd AuthGroupFile /mnt/target02/345709/www.viralert.com/web/content/amember/data/.htgroup Require valid-user


    To allow access to directory for customers of specific products only,
    use the following code.
    AuthType Basic AuthName "Members Only" AuthUserFile /mnt/target02/345709/www.viralert.com/web/content/amember/data/.htpasswd AuthGroupFile /mnt/target02/345709/www.viralert.com/web/content/amember/data/.htgroup Require group PRODUCT_1 PRODUCT_3

    With this code, only customers who have active subscription to
    membership types #1 and/or #3 will be allowed to enter into directory.

    You may want to add line like:
    ErrorDocument 401 /401.htm

    to show page http://www.yoursite.com/401.htm for unauthorized
    customer and redirect them to signup page.


    Do I need to manually copy and paste this somewhere for the protection to work or is this already done on setting up the protected folders?


    Thanks,

    Stallen
  2. skippybosco

    skippybosco CGI-Central Partner Staff Member

    Joined:
    Aug 22, 2006
    Messages:
    2,526
    Stallen, If you use the "Protect Folders" function in the admin control panel (/amember/admin/protect.php) it should do most/all of the work for you depending on your product/server configuration.

Share This Page