|
rewrite rule
location / {
index index.php;
#root /opt/lnmp/nginx/html/dogwin;
if (-f $request_filename){
expires 3d;
access_log off;
}
if ($request_filename !~ (js|css|images|imgs|robots\.txt|index\.php)){
rewrite ^/(.+)$ /index.php/$1 last;
# rewrite . index.php last;
}
location ~ /index.php/ {
fastcgi_index index.php;
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME /opt/lnmp/nginx/html/dogwin/index.php;
include fcgi.conf;
}
不好用,为什么? |
|