dogwin 发表于 2009-12-28 12:25:51

nginx rewrite

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;
      }   

不好用,为什么?
页: [1]
查看完整版本: nginx rewrite