nginx下利用phcalcon生成框架的重写规则

来源:互联网 发布:普通增值税发票软件 编辑:程序博客网 时间:2024/06/06 08:44
server {        listen       80;        server_name  phalcon.test.com;        charset      utf-8;        index index.php index.html index.htm;#       set $root_path '/usr/share/nginx/falcon/invo/invo/public';        set $root_path '/usr/share/nginx/falcon/invo/test/public';        root $root_path;        #location / {        #       try_files $uri $uri/ /index.php;        #}        try_files $uri $uri/ @rewrite;        location @rewrite {                rewrite ^/(.*)$ /index.php?_url=$1;        }        location ~ \.php$ {                        try_files $uri =404;                        fastcgi_split_path_info ^(.+\.php)(/.+)$;                        fastcgi_pass 127.0.0.1:9000;                        fastcgi_index index.php;                        fastcgi_param  SCRIPT_FILENAME  /usr/share/nginx/falcon/invo/test/public$fastcgi_script_name;                        include fastcgi_params;        }        location ~* ^/(css|img|js|flv|swf|download)/(.+)$ {                root $root_path;        }        location ~ /\.ht {                deny all;        }}

0 0