mysql apache Android 微软 HTML5 Python Ubuntu Firefox 开源 java 程序员 shell php google linux centos wordpress nginx Windows linux命令

Yicms仿糗事百科系统nginx下的伪静态规则

Yicms仿糗事百科系统Nginx下的伪静态规则:

location / {
        if (!-e $request_filename) {
                rewrite ^/(.*)$ /index.PHP/Index/$1 last;
        }
}   
     
location ~ .php($|/) {
         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;
         include fcgi.conf;
         fastcgi_param PATH_INFO $path_info;
         fastcgi_param SCRIPT_FILENAME  $document_root$script;
         fastcgi_param SCRIPT_NAME $script;
}    

延伸阅读

评论