检查网址是否有'/?'通过tuckey urlrewrite

时间:2016-12-14 02:24:44

标签: tuckey-urlrewrite-filter

如果网址在'search-product-list /'后面有问号,我需要检查网址重写。我正在使用tuckey。这是现行规则:

    <rule>
            <from>^/n/search-product-list/(.*)$</from>
            <to last="true" type="permanent-redirect">/ttsvr/search-product-list/$1</to>
    </rule>

    <rule>
            <from>^/search-product-list/(.*)$</from>
            <to last="true" type="forward">/n/force-redirect/fitmycar-webdesign-73?query=$1</to>
    </rule>

1 个答案:

答案 0 :(得分:0)

我能够通过这样做得到我期望的结果:

        <rule>
                <from>^/search-product-list/(.*)?q(.*)$</from>
                <to last="true" type="forward">/n/force-redirect/fitmycar-webdesign-73?query=$1</to>
        </rule>