This is how I overcame the new_rewrite not being enabled in my v3.1.3 amember/admin/protection_methods.inc.php function protection_check_new_rewrite(){ // comment out the lines // elseif ($ret != '2-second_file') // return "RewriteRule doesn't work in .htaccess files on this server"; David
But how can I test it to make sure I want to buy it if I can't get it working with the demo version? ...oh wait, he was supposed to ask that not me ;-)
Same Issue with aMember Remote Just wanted to add here that same issue happened with the remote plugin, edit amember_remote/protection_methods.inc.php about line 37 comment out 3 lines as below: $ret = get_url($url = $config[root_url]."data/tests/mod_rewrite/1.php"); if (!strlen($ret)){ $err[] = sprintf(_TPL_READ_FAQ, $url); $res = true; //} elseif ($ret != '2-second_file'){ //$err[] = _TPL_REWRITERULE_DOESNT_WORK; //$res = true; } Hope this helps someone
For Newbies Hi there, I know most of us have some knowledge in this field but for newbies here's what you have to do. Open the file called protection_methods.inc.php located under the admin folder of your amember instalation. Edit it with some text editor like textwrangler. Find the function line previously mentioned function protection_check_new_rewrite(){ You will see several if's and the two lines (usually the last two of that function) that say: elseif ($ret != '2-second_file') return "RewriteRule doesn't work in .htaccess files on this server"; Need to be canceled (commented out) to do this just place two slashes before each line so they should read //elseif ($ret != '2-second_file') //return "RewriteRule doesn't work in .htaccess files on this server"; instead of the original format. Now save the file and try to use the protection again.
the override works, but images/flash do not load for me I modified this code and it correctly enabled the "greyed-out" option for using new_rewrite. I chose it and it correctly protected the folder. So when accessing it, it redirects me to the login screen which is what I want. But once I logged in and accessed the /pro/ version of my app, it wasn't loading any of the images or flash (other than externally hosted banner ads and such). I sent an email to tech support and they did the same exact thing that I already did but I'm still having a problem loading the page.
A follow up, tech support says "works for me" but didn't really suggest any other solutions here. The problem of the images/flash not loading still exists. I used Firebug and saw that it kept trying to load the images but they were giving a "302 found" error http://en.wikipedia.org/wiki/HTTP_302 This did not happen when using the htpasswd protection method. Why would it do this when using the new_rewrite method?
Sorry for incorrect reply in support. This has been fixed. I believe you use RackSpace Cloud hosting or something similar? issue was in media accelerator they have installed(varnish), it store media content in cache, and unfortunately skip cookies when you try to load any media file. So, aMember think that user is not logged in and redirect user back to login page(that's why you see many 302 redirects) /amember/plugins/protect/new_rewrite/new_rewrite.inc.php was changed.
Alex, Are you saying that Amember WILL work with rackspace cloud sites now? Several months back I worked with my developer (and you and them) on getting this to work and it never did. Has that issue been addressed?
Yes it will work with little modification of new_rewrite.inc.php also we plan to include fix for this into next version.
what is the patch I am using 3.1.4PRO and would love to know what the mod is for that file so I can fix this issue today. What is the "little modification of new_rewrite.inc.php"
Edit /amember/plugins/protect/new_rewrite/login.php and change this: header("Location: $_SESSION[amember_nr_url]"); to PHP: if(strpos($_SESSION[amember_nr_url], '?')===false){ header("Location: $_SESSION[amember_nr_url]?cache=0");}else{ header("Location: $_SESSION[amember_nr_url]&cache=0");}
Is this solution still valid for those who use Rackspace and is getting the same message (RewriteRule doesn't work in .htaccess files on this server)? I migrated from a different host provider while ago and, functionality wise, everything seems to be working fine. However, when I tried to add more products to a folder, I got the error above. I'm using version 3.2.3PRO.