如题:
代码
location / {
root /项目目录/;
index index.php;
if (-f $request_filename/index.php){
rewrite (.*) $1/index.php;
}
if (!-f $request_filename){
rewrite (.*) /index.php;
}
}
就这么简单
原文:http://www.cnblogs.com/lanchar/p/5740000.html