location ~ /(msk|spb|sam|etc)/?$ {
## вариант 1. не уверен что это хорошая идея
#error_page 301 =200 /index.php?city=$1&$query_string;
#return 301;
## вариант 2
#try_files $uri $uri/ /index.php?city=$1&$query_string;
## вариант 3
fastcgi_pass php_fpm;
include fastcgi_params;
fastcgi_param QUERY_STRING city=$1&$query_string;
fastcgi_param SCRIPT_FILENAME $document_root/index.php;
}
location ~ /dir1 {
rewrite ^/dir1/([a-z]+)/$ /dir1/?city=$1 last;
}
location ~ /some/another/dir {
rewrite ^/some/another/dir/([a-z]+)/$ /some/another/dir/?city=$1 last;
}
RFC 1035 Updated by RFC 1101, RFC 1183, RFC 1348, RFC 1876, RFC 1982, RFC 1995, RFC 1996, RFC 2065, RFC 2136, RFC 2181, RFC 2137, RFC 2308, RFC 2535, RFC 2673, RFC 2845, RFC 3425, RFC 3658, RFC 4033, RFC 4034, RFC 4035, RFC 4343, RFC 5936, RFC 5966, RFC 6604.