您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

nginx伪静态rewrite规则写法实例

2024/3/29 16:25:46发布10次查看
在网站配置文件中www.huobo.cc.conf
.....
        server_name www.huobo.cc;
        index index.html index.htm index.php;
        root  /home/wwwroot/huobo;
......
在root 这行下面添加上 include huobo.cc.conf;
内容为:
location / {
            rewrite ^/[a-za-z]+/([0-9]+)/vod\-([0-9]+)-([0-9]+)\.html$ /video/index.php?$1-$2-$3.html last;
        }
这个规则是把http://www.huobo.cc/xiju/13239/vod-0-0.html重写到根目录下的/video文件夹中的index.php并带上参数
以上就介绍了nginx伪静态rewrite规则写法实例,包括了include方面的内容,希望对php教程有兴趣的朋友有所帮助。
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product