Skip to content

WPEngine

Contact WpEngine support and ask them:

  1. add the following locations above other locations within nginx configuration (section Before in WPEngine control panel) (replace amember with actual url of your installation)
location ~* ^/amember/data/public/* {}
location ~* ^/amember/data/.* {internal;}
location ~* ^/amember/public(?!\.php) { rewrite ^.*$ /amember/public.php; }
location ~* ^/amember/.*\.(js|ico|gif|jpg|png|css|swf|csv|svg)$ {}
location ~* ^/amember/setup/(?!index\.php) { rewrite ^.*$ /amember/setup/index.php; }
location ~* ^/amember/(?!js\.php|index\.php|public\.php|setup/index\.php) { rewrite ^.*$ /amember/index.php; }
  1. add the following line of code to same location where they set proxy_pass directive (section Before-in-location in WPEngine control panel):
proxy_set_header X-Original-Request $request_uri;
  1. disable cache for folder /amember

Then edit file: /amember/application/configs/config.php

and above return statement add:

if (!empty($_SERVER['HTTP_X_ORIGINAL_REQUEST'])) {
$_SERVER['REQUEST_URI'] = $_SERVER['HTTP_X_ORIGINAL_REQUEST'];
}