I've set up aMember folder protection for our Drupal site (we've bought the Drupal plugin). The problem is, when you log on via the aMember login you can see the home page of the protected folder, but none of the content sitting in the sub-directories. Set up is: aMember located in: www.example.com/amember Drupal located in: www.example.com/amember/files/drupal The inaccessible content is located in sub directories off the drupal folder (e.g. www.example.com/amember/files/drupal/videos) In aMember, I've protected the folder (www.example.com/amember/files/drupal/) by selecting the new_rewrite option. In the www.example.com/amember/files/drupal folder there doesn't seem to be a .htaccess file to modify, and I get a forbidden error if I try to upload one. The ISP's Web server is running Apache, I think. What do I need to do?
.htaccess file has now appeared I was composing an email to support and creating some screen grabs, when I noticed there is now a .htaccess file in the Drupal folder. I don't know why I couldn't see that file yesterday. It contains (for consistency, I've amended the domain to example.com): ########### AMEMBER START ##################### Options +FollowSymLinks RewriteEngine On ## allow access for product #22 RewriteCond %{HTTP_COOKIE} amember_nr=([a-zA-Z0-9]+) RewriteCond /home/5471/ejpratt/www.example.com/public_html/amember/data/new_rewrite/%1-22 -f RewriteRule ^(.*)$ - [L] ## allow access for product #21 RewriteCond %{HTTP_COOKIE} amember_nr=([a-zA-Z0-9]+) RewriteCond /home/5471/ejpratt/www.example.com/public_html/amember/data/new_rewrite/%1-21 -f RewriteRule ^(.*)$ - [L] ## if user is not authorized, redirect to login page # BrowserMatch "MSIE" force-no-vary RewriteCond %{QUERY_STRING} (.+) RewriteRule ^(.*)$ http://www.example.com/amember/plugins/protect/new_rewrite/login.php?v=-22,21&url=%{REQUEST_URI}?%{QUERY_STRING} [L,R] RewriteRule ^(.*)$ http://www.example.com/amember/plugins/protect/new_rewrite/login.php?v=-22,21&url=%{REQUEST_URI} [L,R] ########### AMEMBER FINISH #################### I've added the code suggested in the "A-z (how To Protect Files And Folder)" thread, but I haven't been able to solve the problem. ############################## AuthType Basic AuthName "Members Only" AuthUserFile /home/5471/ejpratt/www.example.com/public_html/amember/data/.htpasswd AuthGroupFile /home/5471/ejpratt/www.example.com/public_html/amember/data/.htgroup Require group PRODUCT_22 PRODUCT_21 ErrorDocument 401 "Unauthorized" ############################## I still cannot access the sub directories. What am I doing wrong?
Do you have copy of the .htaccess file that was paced by Drupal initially? There can be necessary rewrute rules for Drupal. If you have that file copy it content to the .htaccess created by aMember to the top of the file.
That worked, thank you I've copied the content from the original .htaccess file and it worked! I needed to copy it before the aMember code, as you suggested. It didn't work if the aMember code was at the top.