From eb6f183f0565936c65b4f9e9ec85baa1108daaf2 Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Mon, 25 Feb 2019 07:47:36 +0100 Subject: [PATCH] update nginx php query parameter handling * replace /index.php?$args with /index.php$is_args$args according to WP 5.0 rest api faq --- wo/cli/templates/22222.mustache | 2 +- wo/cli/templates/locations-php7.mustache | 2 +- wo/cli/templates/locations.mustache | 2 +- wo/cli/templates/php-hhvm.mustache | 2 +- wo/cli/templates/php.mustache | 2 +- wo/cli/templates/php7.mustache | 2 +- wo/cli/templates/redis-hhvm.mustache | 2 +- wo/cli/templates/redis-php7.mustache | 2 +- wo/cli/templates/redis.mustache | 2 +- wo/cli/templates/wpfc-hhvm.mustache | 2 +- wo/cli/templates/wpfc-php7.mustache | 2 +- wo/cli/templates/wpfc.mustache | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/wo/cli/templates/22222.mustache b/wo/cli/templates/22222.mustache index ecd934b..346c164 100644 --- a/wo/cli/templates/22222.mustache +++ b/wo/cli/templates/22222.mustache @@ -23,7 +23,7 @@ server { include common/acl.conf; location / { - try_files $uri $uri/ /index.php?$args; + try_files $uri $uri/ /index.php$is_args$args; } # Display menu at location /fpm/status/ diff --git a/wo/cli/templates/locations-php7.mustache b/wo/cli/templates/locations-php7.mustache index ec75110..58c0011 100644 --- a/wo/cli/templates/locations-php7.mustache +++ b/wo/cli/templates/locations-php7.mustache @@ -9,7 +9,7 @@ location = /favicon.ico { location = /robots.txt { # Some WordPress plugin gererate robots.txt file # Refer #340 issue - try_files $uri $uri/ /index.php?$args @robots; + try_files $uri $uri/ /index.php$is_args$args @robots; access_log off; log_not_found off; } diff --git a/wo/cli/templates/locations.mustache b/wo/cli/templates/locations.mustache index 38e20dd..36155bf 100644 --- a/wo/cli/templates/locations.mustache +++ b/wo/cli/templates/locations.mustache @@ -9,7 +9,7 @@ location = /favicon.ico { location = /robots.txt { # Some WordPress plugin gererate robots.txt file # Refer #340 issue - try_files $uri $uri/ /index.php?$args @robots; + try_files $uri $uri/ /index.php$is_args$args @robots; access_log off; log_not_found off; } diff --git a/wo/cli/templates/php-hhvm.mustache b/wo/cli/templates/php-hhvm.mustache index 3c7a7bb..ac76401 100644 --- a/wo/cli/templates/php-hhvm.mustache +++ b/wo/cli/templates/php-hhvm.mustache @@ -1,7 +1,7 @@ # PHP NGINX CONFIGURATION # DO NOT MODIFY, ALL CHANGES WILL BE LOST AFTER AN WordOps (wo) UPDATE location / { - try_files $uri $uri/ /index.php?$args; + try_files $uri $uri/ /index.php$is_args$args; } location ~ \.php$ { try_files $uri =404; diff --git a/wo/cli/templates/php.mustache b/wo/cli/templates/php.mustache index de0f096..65f75fe 100644 --- a/wo/cli/templates/php.mustache +++ b/wo/cli/templates/php.mustache @@ -1,7 +1,7 @@ # PHP NGINX CONFIGURATION # DO NOT MODIFY, ALL CHANGES WILL BE LOST AFTER AN WordOps (wo) UPDATE location / { - try_files $uri $uri/ /index.php?$args; + try_files $uri $uri/ /index.php$is_args$args; } location ~ \.php$ { try_files $uri =404; diff --git a/wo/cli/templates/php7.mustache b/wo/cli/templates/php7.mustache index d9f9d9a..871d3c5 100644 --- a/wo/cli/templates/php7.mustache +++ b/wo/cli/templates/php7.mustache @@ -1,7 +1,7 @@ # PHP NGINX CONFIGURATION # DO NOT MODIFY, ALL CHANGES WILL BE LOST AFTER AN WordOps (wo) UPDATE location / { - try_files $uri $uri/ /index.php?$args; + try_files $uri $uri/ /index.php$is_args$args; } location ~ \.php$ { try_files $uri =404; diff --git a/wo/cli/templates/redis-hhvm.mustache b/wo/cli/templates/redis-hhvm.mustache index 8ebeaf8..764ef09 100644 --- a/wo/cli/templates/redis-hhvm.mustache +++ b/wo/cli/templates/redis-hhvm.mustache @@ -18,7 +18,7 @@ if ($http_cookie ~* "comment_author|wordpress_[a-f0-9]+|wp-postpass|wordpress_no } # Use cached or actual file if they exists, Otherwise pass request to WordPress location / { - try_files $uri $uri/ /index.php?$args; + try_files $uri $uri/ /index.php$is_args$args; } location /redis-fetch { diff --git a/wo/cli/templates/redis-php7.mustache b/wo/cli/templates/redis-php7.mustache index 9134b84..93d5943 100644 --- a/wo/cli/templates/redis-php7.mustache +++ b/wo/cli/templates/redis-php7.mustache @@ -18,7 +18,7 @@ if ($http_cookie ~* "comment_author|wordpress_[a-f0-9]+|wp-postpass|wordpress_no } # Use cached or actual file if they exists, Otherwise pass request to WordPress location / { - try_files $uri $uri/ /index.php?$args; + try_files $uri $uri/ /index.php$is_args$args; } location /redis-fetch { diff --git a/wo/cli/templates/redis.mustache b/wo/cli/templates/redis.mustache index 8335ea8..e29e02f 100644 --- a/wo/cli/templates/redis.mustache +++ b/wo/cli/templates/redis.mustache @@ -18,7 +18,7 @@ if ($http_cookie ~* "comment_author|wordpress_[a-f0-9]+|wp-postpass|wordpress_no } # Use cached or actual file if they exists, Otherwise pass request to WordPress location / { - try_files $uri $uri/ /index.php?$args; + try_files $uri $uri/ /index.php$is_args$args; } location /redis-fetch { diff --git a/wo/cli/templates/wpfc-hhvm.mustache b/wo/cli/templates/wpfc-hhvm.mustache index 424e95b..6326d5d 100644 --- a/wo/cli/templates/wpfc-hhvm.mustache +++ b/wo/cli/templates/wpfc-hhvm.mustache @@ -18,7 +18,7 @@ if ($http_cookie ~* "comment_author|wordpress_[a-f0-9]+|wp-postpass|wordpress_no } # Use cached or actual file if they exists, Otherwise pass request to WordPress location / { - try_files $uri $uri/ /index.php?$args; + try_files $uri $uri/ /index.php$is_args$args; } location ~ ^/wp-content/cache/minify/(.+\.(css|js))$ { try_files $uri /wp-content/plugins/w3-total-cache/pub/minify.php?file=$1; diff --git a/wo/cli/templates/wpfc-php7.mustache b/wo/cli/templates/wpfc-php7.mustache index 108a3e8..b62d088 100644 --- a/wo/cli/templates/wpfc-php7.mustache +++ b/wo/cli/templates/wpfc-php7.mustache @@ -18,7 +18,7 @@ if ($http_cookie ~* "comment_author|wordpress_[a-f0-9]+|wp-postpass|wordpress_no } # Use cached or actual file if they exists, Otherwise pass request to WordPress location / { - try_files $uri $uri/ /index.php?$args; + try_files $uri $uri/ /index.php$is_args$args; } location ~ ^/wp-content/cache/minify/(.+\.(css|js))$ { try_files $uri /wp-content/plugins/w3-total-cache/pub/minify.php?file=$1; diff --git a/wo/cli/templates/wpfc.mustache b/wo/cli/templates/wpfc.mustache index 6406b71..ec03b0c 100644 --- a/wo/cli/templates/wpfc.mustache +++ b/wo/cli/templates/wpfc.mustache @@ -18,7 +18,7 @@ if ($http_cookie ~* "comment_author|wordpress_[a-f0-9]+|wp-postpass|wordpress_no } # Use cached or actual file if they exists, Otherwise pass request to WordPress location / { - try_files $uri $uri/ /index.php?$args; + try_files $uri $uri/ /index.php$is_args$args; } location ~ ^/wp-content/cache/minify/(.+\.(css|js))$ { try_files $uri /wp-content/plugins/w3-total-cache/pub/minify.php?file=$1;