Hi all, I want to protect a folder on my server so only active and paid members can access it. For some reason I can not use the new rewrite method. Is there something I need to do or a code I need to put onto my hosts server to make this new rewrite work? Please bare with me as I'm not an expert. My files are all html - if that helps in anyway. Many thanks in advanced for your help and support
Check to see if mod_rewrite is enabled on your host. amember admin /version info / do a search for mod_rewrite enabled. If you see it you can have amember fix the code to allow it. If its not present, send a tech support ticket to your host to enable it. David
1and1 Thanks for the reply David! I have spoken to 1and1 (my host) and they have advised that it is definitely switched on. I have tried the following code in a .htaccess and php.ini file and still nothing: RewriteEngine On Am I missing something here?
This hack will override and allow you to use new_rewrite. https://www.amember.com/forum/showthread.php?t=8488 David
Thanks David! I put the code into the protection_methods.inc.php file at the top but within my admin side of the membership database I get an error now??? Code: Parse error: syntax error, unexpected $end in /homepages/.........../admin/protection_methods.inc.php on line 310 Not sure what this means? I checked in 301 and I saw this ?>
not sure what you did, you should have just added // before elseif ($ret != '2-second_file') and return "RewriteRule doesn't work in .htaccess files on this server"; so it looks like this // elseif ($ret != '2-second_file') // return "RewriteRule doesn't work in .htaccess files on this server"; David
Hi 519, You might have added/remove some important code accidentally. Can you restore to your backup file and try editing it again? Lee
Hi all, The Support Desk managed to help me out! Thanks once again for your time and expertise, greatly appreciated. Andrew