• nginx rewrite正则子组最多匹配到$9


    nginx rewrite正则匹配()匹配子组最多匹配到$9,就是从$0到$9

    当需要匹配更多子组时,可通过变量来实现

    if ($uri ~ ^/forum-15/sortid-74/(.*?)(lastpost|dateline)-([0-9]+)-([0-9]+)-([0-9]+)-([0-9]+).html$){
        set $orderby $2;
        set $mdate $3;
        set $workhours $4;
        set $pricerange $5;
        set $page $6;

        rewrite ^([^.]*)/forum-15/sortid-74/(w+)/(w+)/(.*?)/(w+)/(w+)/(w+)/(lastpost|dateline)-([0-9]+)-([0-9]+)-([0-9]+)-([0-9]+).html$ $1/forum.php?mod=forumdisplay&fid=15&filter=sortid&sortid=74&epuipment=$2&brand=$3&model=$4&province=$5&city=$6&district=$7&mdate=$mdate&workhours=$workhours&pricerange=$pricerange&page=$page&orderby=$orderby last;
    }

  • 相关阅读:
    ASP.NET Core 进程内(InProcess)托管
    ASP.NET Core 中的 Main 方法
    ASP.NET Core Web 项目文件
    5)
    4)
    单词
    html5单词
    3)
    2)
    1)
  • 原文地址:https://www.cnblogs.com/dongruiha/p/6847515.html
Copyright © 2020-2023  润新知