【发布时间】:2012-10-31 18:53:34
【问题描述】:
我目前将此设置(具有不同的根路径)用于我的 nginx 机器上的另一个站点,对于该站点,这与干净的 url 一起正常工作。
location ^~ /learn {
root /var/www/blogs/mysite/learn;
index index.php index.html index.htm;
try_files $uri $uri/ /index.php;
location ~ \.php$ {
fastcgi_split_path_info ^(.*\.php)(.*)$;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
fastcgi_pass 127.0.0.1:9000;
}
}
但是,当应用于同一台机器上的不同站点时,干净的 url 会导致页面未找到错误。这是为什么呢?
【问题讨论】:
标签: wordpress nginx clean-urls