伪静态下nginx的路由规则该如何写?

如题apache默认的就可以伪静态如果使用nginx的话路由规则就会报错


nginx规则如下:

server {
        listen       80;
        server_name  local.sns.com ;
        root   "F:Program_PHPHaoWebesphp";
        index index.html index.htm index.php default.html default.htm default.php;
        location / {
            index  index.html index.htm index.php;
            #autoindex  on;
            if (!-e $request_filename){
                rewrite  ^/(.*)$  /index.php?s=/$1  last;
            }
        }
        location ~ .php(.*)$ {
            fastcgi_pass   127.0.0.1:9000;
            fastcgi_index  index.php;
            fastcgi_split_path_info  ^((?U).+.php)(/?.+)$;
            fastcgi_param  script_FILENAME  $document_root$fastcgi_script_name;
            fastcgi_param  PATH_INFO  $fastcgi_path_info;
            fastcgi_param  PATH_TRANSLATED  $document_root$fastcgi_path_info;
            include        fastcgi_params;
        }
}

欢迎积极参与 - 本帖共被表态0次
没太明白你啥意思,你给的代码也转换不过来。
怎么设置伪静态?

要回复讨论请先登录注册