一步:先写了一个 rewrite 文件osinx.conf放在index.php的同级目录下;
二步:然后在nginx.conf里include 这个文件
location / {
if (!-e $request_filename){
rewrite ^/(.*)$ /index.php/$1 last;
}
include "D:/localhost/opdell/osinx.conf";
}
三步:然后 修改url_model 为 rewrite模式。
结果: 访问网站,发现url是变了,从"localhost/opdell/index.php?s=home/index/index" 变成了“localhost/opdell/home”. 但是报错“No input file specified.”。 我认为,首先rewrite是生效了的,但是为什么修改后的url好像还是按照之前的兼容模式访问了系统。导致了这个错误。??