1. 程式人生 > >nginx reload 二級目錄地址重寫,正向負查

nginx reload 二級目錄地址重寫,正向負查

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

    location ~ .*\.php.*
    {
        rewrite ^/([^/.]+)(?!/index\.php)(/.*)$ /$1/index.php$2 last;
        include php_fcgi.conf;
        include pathinfo.conf;
    }