MrTonyDu
MrTonyDu
下面是我给wordpress网站加的rewrite: location / { if (-f $request_filename/index.html){ rewrite (._) $1/index.html break; } if (-f $request_filename/index.php){ rewrite (._) $1/index.php; } if ($request_filename ~ /lua){ break; } if ($request_filename ~ /getPCount){ break;...
还有就是使用vn的rewrite后,好像并不会重新去匹配server中配置的location,新手,描述问题可能不恰当,见谅
在我配置的rewrite下面有这样一个配置 location ~ .*.php$ { fastcgi_pass unix:/tmp/php-cgi-tony-ourmemory.org.sock; fastcgi_index index.php; include fcgi.conf; fastcgi_param DOCUMENT_ROOT /home/wwwroot/tony/domain/ourmemory.org/web$subdomain; fastcgi_param SCRIPT_FILENAME /home/wwwroot/tony/domain/ourmemory.org/web$subdomain$fastcgi_script_name; }, 我通过vn来rewrite到/index.php后直接下载index.php了
- 加了上面的rewrite后,vn的filter运行有问题,并不能阻断请求,而是会进到我在nginx.conf中加的rewrite中 这里是这个意思: 我在vn中的filter中有  但是我访问http://host/.git会进入到 if (!-f $request_filename){ rewrite (.*) /index.php; } 这个规则