我在带有 php5-fpm 的 Ubuntu 10.4 上使用 NGINX 1.2.3。
http://example.com/step2.php?qid=RAUVGXF
我想改写
/step2.php?qid=RAUVGXF
为
/step2/RAUVGXF
我怎样才能做到这一点?
我的 NGINX 配置的一部分如下所示:
root /var/www;
location ~ .php$ {
fastcgi_param HTTPS on;
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_param SCRIPT_FILENAME /var/www$fastcgi_script_name;
include /etc/nginx/fastcgi_params;
fastcgi_index index.php;
}