Regex SSI查询字符串语法

Regex SSI查询字符串语法,regex,query-string,ssi,shtml,Regex,Query String,Ssi,Shtml,我对SSI中的查询字符串有问题。语法无效。示例URL如下所示: www.site.com/index.shtml?firstID=100&secondID=104&thirdID=true <!--if expr="$QUERY_STRING = /^.*firstID=(.*)&.*/" --> <!--#include virtual="page_1.shtml" --> <!--#elif expr="$QUERY_STRI

我对SSI中的查询字符串有问题。语法无效。示例URL如下所示:

www.site.com/index.shtml?firstID=100&secondID=104&thirdID=true 

<!--if expr="$QUERY_STRING = /^.*firstID=(.*)&.*/" --> 
   <!--#include virtual="page_1.shtml" -->
<!--#elif expr="$QUERY_STRING = /^.*firstID=(.*)&.secondID=(.*)&.thirdID=(.*)/" --> 
    <!--#include virtual="page_2.shtml" -->
<!--#endif -->
www.site.com/index.shtml?firstID=100&secondID=104&thirdID=true
第一个“如果”正确,第二个则不正确


我错在哪里?

在您的第二个模式中,在
第二个ID
第三个ID
之前有
导致它查找额外字符。移除这些,图案应匹配:

^.*firstID=(.*)和secondID=(.*)和thirdID=(.*)