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.
This commit is contained in:
Christiaan Conover 2013-07-10 13:39:15 -04:00
parent 3d0a36b396
commit 4eb499d5ca

View file

@ -80,26 +80,26 @@ MEMCACHED_SERVERS
fastcgi_param CONTENT_TYPE $content_type; fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length; fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name; fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param REQUEST_URI $request_uri; fastcgi_param REQUEST_URI $request_uri;
fastcgi_param DOCUMENT_URI $document_uri; fastcgi_param DOCUMENT_URI $document_uri;
fastcgi_param DOCUMENT_ROOT $document_root; fastcgi_param DOCUMENT_ROOT $document_root;
fastcgi_param SERVER_PROTOCOL $server_protocol; fastcgi_param SERVER_PROTOCOL $server_protocol;
fastcgi_param GATEWAY_INTERFACE CGI/1.1; fastcgi_param GATEWAY_INTERFACE CGI/1.1;
fastcgi_param SERVER_SOFTWARE nginx; fastcgi_param SERVER_SOFTWARE nginx;
fastcgi_param REMOTE_ADDR $remote_addr; fastcgi_param REMOTE_ADDR $remote_addr;
fastcgi_param REMOTE_PORT $remote_port; fastcgi_param REMOTE_PORT $remote_port;
fastcgi_param SERVER_ADDR $server_addr; fastcgi_param SERVER_ADDR $server_addr;
fastcgi_param SERVER_PORT $server_port; fastcgi_param SERVER_PORT $server_port;
fastcgi_param SERVER_NAME $server_name; fastcgi_param SERVER_NAME $server_name;
fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info; fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
fastcgi_param REDIRECT_STATUS 200; fastcgi_param REDIRECT_STATUS 200;
# uncomment these for HTTPS usage # 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_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_SESSION_ID $ssl_session_id if_not_empty;
#fastcgi_param SSL_CLIENT_VERIFY $ssl_client_verify if_not_empty; #fastcgi_param SSL_CLIENT_VERIFY $ssl_client_verify if_not_empty;
@ -134,7 +134,7 @@ MEMCACHED_SERVERS
if ( $memcached_request = 1) { if ( $memcached_request = 1) {
memcached_pass memcached-servers; memcached_pass memcached-servers;
error_page 404 = @rewrites; error_page 404 = @dynamic;
} }
if ( $memcached_request = 0) { if ( $memcached_request = 0) {
@ -142,9 +142,9 @@ MEMCACHED_SERVERS
} }
} }
## rewrite rules ## Dynamic (non-memcached) requests
location @rewrites { location @dynamic {
rewrite ^ /index.php?$args last; try_files $uri $uri/ /index.php$is_args$args;
} }
} }