From 4eb499d5ca38b69655729bebecef1b434a4d7a27 Mon Sep 17 00:00:00 2001 From: Christiaan Conover Date: Wed, 10 Jul 2013 13:39:15 -0400 Subject: [PATCH] Changed @rewrites location & rules Renamed "@rewrites" to "@dynamic" and updated references to that location. Removed 'rewrite' rule from @dynamic and replaced it with 'try_files' rule. --- wp-ffpc-nginx-sample.conf | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/wp-ffpc-nginx-sample.conf b/wp-ffpc-nginx-sample.conf index f7e5e2e..d4903f9 100644 --- a/wp-ffpc-nginx-sample.conf +++ b/wp-ffpc-nginx-sample.conf @@ -80,26 +80,26 @@ MEMCACHED_SERVERS fastcgi_param CONTENT_TYPE $content_type; fastcgi_param CONTENT_LENGTH $content_length; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - fastcgi_param SCRIPT_NAME $fastcgi_script_name; - fastcgi_param REQUEST_URI $request_uri; + fastcgi_param SCRIPT_NAME $fastcgi_script_name; + fastcgi_param REQUEST_URI $request_uri; fastcgi_param DOCUMENT_URI $document_uri; fastcgi_param DOCUMENT_ROOT $document_root; fastcgi_param SERVER_PROTOCOL $server_protocol; fastcgi_param GATEWAY_INTERFACE CGI/1.1; fastcgi_param SERVER_SOFTWARE nginx; - fastcgi_param REMOTE_ADDR $remote_addr; - fastcgi_param REMOTE_PORT $remote_port; - fastcgi_param SERVER_ADDR $server_addr; - fastcgi_param SERVER_PORT $server_port; - fastcgi_param SERVER_NAME $server_name; - fastcgi_param PATH_INFO $fastcgi_path_info; + fastcgi_param REMOTE_ADDR $remote_addr; + fastcgi_param REMOTE_PORT $remote_port; + fastcgi_param SERVER_ADDR $server_addr; + fastcgi_param SERVER_PORT $server_port; + fastcgi_param SERVER_NAME $server_name; + fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info; fastcgi_param REDIRECT_STATUS 200; # uncomment these for HTTPS usage - #fastcgi_param HTTPS $https if_not_empty; + #fastcgi_param HTTPS $https if_not_empty; #fastcgi_param SSL_PROTOCOL $ssl_protocol if_not_empty; - #fastcgi_param SSL_CIPHER $ssl_cipher if_not_empty; + #fastcgi_param SSL_CIPHER $ssl_cipher if_not_empty; #fastcgi_param SSL_SESSION_ID $ssl_session_id if_not_empty; #fastcgi_param SSL_CLIENT_VERIFY $ssl_client_verify if_not_empty; @@ -134,7 +134,7 @@ MEMCACHED_SERVERS if ( $memcached_request = 1) { memcached_pass memcached-servers; - error_page 404 = @rewrites; + error_page 404 = @dynamic; } if ( $memcached_request = 0) { @@ -142,9 +142,9 @@ MEMCACHED_SERVERS } } - ## rewrite rules - location @rewrites { - rewrite ^ /index.php?$args last; + ## Dynamic (non-memcached) requests + location @dynamic { + try_files $uri $uri/ /index.php$is_args$args; } }