琉璃 发表于 2012-11-28 19:51:08

server
{
    listen       80;
    server_namelocalhost;
    index index.php index.htm index.html;
    root/www/php_example/;

    #limit_conn   crawler20;   

    location / {
       index index.php index.html;
      
       if (!-e $request_filename) {
         rewrite ^/(.*)$ /index.php/$1 last;
       }
      
    }

    location ~ .*\.(php|php5)?$
    {      
      #fastcgi_passunix:/tmp/php-cgi.sock;
      fastcgi_pass127.0.0.1:9000;
      fastcgi_index index.php;   
      include /etc/nginx/fastcgi_params;

      fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    }

    location ~ .*\.(php|php5)?($|/) {

       set $script $uri;
       set $path_info "";

       if ($uri ~ "^(.+.php)(/.+)") {
         set $script $1;
         set $path_info $2;
      }

       fastcgi_pass 127.0.0.1:9000;
       fastcgi_index index.php;
       fastcgi_param SCRIPT_FILENAME $document_root$script;
       fastcgi_param SCRIPT_NAME $script;
       fastcgi_param PATH_INFO $path_info;

}

}

qingbofish 发表于 2013-1-8 20:31:22

幻想曲 发表于 2012-2-8 15:34 static/image/common/back.gif
终于找到一个可用的:




连server都没有的,亲,你怎么用的啊
页: 1 [2]
查看完整版本: 求Nginx下CI的urlrewrite规则