crx349 发表于 2017-9-27 16:07:17

有价Nginx伪静态规则

location / {
        rewrite ^([^\.]*)/search(.*)\.html$ $1/index.php?str=$2 last;
        rewrite ^([^\.]*)/view(*)\.html$ $1/view.php?id=$2 last;
    rewrite ^([^\.]*)/txtlist(.*)\.html$ $1/txtlist.php?str=$2 last;
    rewrite ^([^\.]*)/(.*)list(.*).html\.html$ $1/$2list.php?str=$3 last;
    rewrite ^([^\.]*)/(.*)view(.*)\.html$ $1//$2view.php?id=$3 last;
}

页: [1]
查看完整版本: 有价Nginx伪静态规则