diff --git a/usr/share/easyengine/nginx/wpsubdir/w3tc.conf b/usr/share/easyengine/nginx/wpsubdir/w3tc.conf index b0efa263..fef6aa51 100644 --- a/usr/share/easyengine/nginx/wpsubdir/w3tc.conf +++ b/usr/share/easyengine/nginx/wpsubdir/w3tc.conf @@ -15,18 +15,6 @@ server { root /var/www/example.com/htdocs; index index.php index.htm index.html; - if (!-e $request_filename) { - - # Redirect wp-admin To wp-admin/ - rewrite /wp-admin$ $scheme://$host$uri/ permanent; - - # Redirect wp-* Files/Folders - rewrite ^(/[^/]+)?(/wp-.*) $2 last; - - # Redirect Other PHP Files - rewrite ^(/[^/]+)?(/.*\.php) $2 last; - } - set $cache_uri $request_uri; # POST Requests And Urls With A Query String Should Always Go To PHP @@ -48,6 +36,18 @@ server { set $cache_uri 'null cache'; } + if (!-e $request_filename) { + + # Redirect wp-admin To wp-admin/ + rewrite /wp-admin$ $scheme://$host$uri/ permanent; + + # Redirect wp-* Files/Folders + rewrite ^(/[^/]+)?(/wp-.*) $2 last; + + # Redirect Other PHP Files + rewrite ^(/[^/]+)?(/.*\.php) $2 last; + } + # Use Cached Or Actual File If They Exists, Otherwise Pass Request To WordPress location / { try_files /wp-content/cache/page_enhanced/${host}${cache_uri}_index.html $uri $uri/ /index.php?$args; diff --git a/usr/share/easyengine/nginx/wpsubdir/wpfc.conf b/usr/share/easyengine/nginx/wpsubdir/wpfc.conf index 9f8b22cc..5e094b48 100644 --- a/usr/share/easyengine/nginx/wpsubdir/wpfc.conf +++ b/usr/share/easyengine/nginx/wpsubdir/wpfc.conf @@ -15,18 +15,6 @@ server { root /var/www/example.com/htdocs; index index.php index.htm index.html; - if (!-e $request_filename) { - - # Redirect wp-admin To wp-admin/ - rewrite /wp-admin$ $scheme://$host$uri/ permanent; - - # Redirect wp-* Files/Folders - rewrite ^(/[^/]+)?(/wp-.*) $2 last; - - # Redirect Other PHP Files - rewrite ^(/[^/]+)?(/.*\.php) $2 last; - } - set $skip_cache 0; # POST Requests And Urls With A Query String Should Always Go To PHP @@ -48,6 +36,18 @@ server { set $skip_cache 1; } + if (!-e $request_filename) { + + # Redirect wp-admin To wp-admin/ + rewrite /wp-admin$ $scheme://$host$uri/ permanent; + + # Redirect wp-* Files/Folders + rewrite ^(/[^/]+)?(/wp-.*) $2 last; + + # Redirect Other PHP Files + rewrite ^(/[^/]+)?(/.*\.php) $2 last; + } + # Use Cached Or Actual File If They Exists, Otherwise Pass Request To WordPress location / { try_files $uri $uri/ /index.php?$args; diff --git a/usr/share/easyengine/nginx/wpsubdir/wpsc.conf b/usr/share/easyengine/nginx/wpsubdir/wpsc.conf index 3bd81dd5..a9b98591 100644 --- a/usr/share/easyengine/nginx/wpsubdir/wpsc.conf +++ b/usr/share/easyengine/nginx/wpsubdir/wpsc.conf @@ -15,18 +15,6 @@ server { root /var/www/example.com/htdocs; index index.php index.htm index.html; - if (!-e $request_filename) { - - # Redirect wp-admin To wp-admin/ - rewrite /wp-admin$ $scheme://$host$uri/ permanent; - - # Redirect wp-* Files/Folders - rewrite ^(/[^/]+)?(/wp-.*) $2 last; - - # Redirect Other PHP Files - rewrite ^(/[^/]+)?(/.*\.php) $2 last; - } - set $cache_uri $request_uri; # POST Requests And Urls With A Query String Should Always Go To PHP @@ -48,6 +36,18 @@ server { set $cache_uri 'null cache'; } + if (!-e $request_filename) { + + # Redirect wp-admin To wp-admin/ + rewrite /wp-admin$ $scheme://$host$uri/ permanent; + + # Redirect wp-* Files/Folders + rewrite ^(/[^/]+)?(/wp-.*) $2 last; + + # Redirect Other PHP Files + rewrite ^(/[^/]+)?(/.*\.php) $2 last; + } + # Use Cached Or Actual File If They Exists, Otherwise Pass Request To WordPress location / { try_files /wp-content/cache/supercache/$http_host/$cache_uri/index.html $uri $uri/ /index.php?$args;