After installing amember, tried to add a simple folder protection a directory but am getting a redirect loop (even if set to free content). Just upgraded to 4.1.9 but problem persist. Any suggestion as to where to start looking for potential resolution? thanks *P
David: screenshot attached (and at http://screencast.com/t/oGYvAT3ya) .htaccess below. many thanks *K Code: ########### AMEMBER START ##################### Options +FollowSymLinks RewriteEngine On # if cookie is set and file exists, stop rewriting and show page RewriteCond %{HTTP_COOKIE} amember_nr=([a-zA-Z0-9]+) RewriteCond /Library/WebServer/Documents/openmetadata/amember/data/new-rewrite/%1-2 -f RewriteRule ^(.*)$ - [S=3] # if cookie is set but folder file does not exists, user has no access to given folder RewriteCond %{HTTP_COOKIE} amember_nr=([a-zA-Z0-9]+) RewriteCond /Library/WebServer/Documents/openmetadata/amember/data/new-rewrite/%1 !-f RewriteRule ^(.*)$ http://localhost/openmetadata/amember/no-access/folder/id/2 [L,R] ## if user is not authorized, redirect to login page # BrowserMatch "MSIE" force-no-vary RewriteCond %{QUERY_STRING} (.+) RewriteRule ^(.*)$ http://localhost/openmetadata/amember/protect/new-rewrite?f=2&url=%{REQUEST_URI}?%{QUERY_STRING} [L,R] RewriteRule ^(.*)$ http://localhost/openmetadata/amember/protect/new-rewrite?f=2&url=%{REQUEST_URI} [L,R] ########### AMEMBER FINISH ####################
Code looks right- send in a tech support ticket, maybe a bug or something specific to your hosting config. David
There was a bug in new-rewrite and it is fixed already. .htaccess file were not created right. Edit it and change this line: RewriteCond /Library/WebServer/Documents/openmetadata/amember/data/new-rewrite/%1 !-f to RewriteCond /Library/WebServer/Documents/openmetadata/amember/data/new-rewrite/%1-2 !-f It should be the same as the line in first block: RewriteCond /Library/WebServer/Documents/openmetadata/amember/data/new-rewrite/%1-2 -f