1
我正尝试在以“#”字符开头的web.config文件中创建重写规则。如何创建以'#'开头的重写规则
我有以下URL“www.example.com/#abcd= http://www.example.com/myfolder/mypage”。该网址需要重定向到“www.example.com/myfolder/mypage.html”。
我试过以下规则,但似乎没有工作。
<rule name="myRedirect" stopProcessing="true" patternSyntax="ExactMatch" >
<match url="##abcd=http://www.example.com/myfolder/mypage" ignoreCase="false"/>
<action type="Redirect" url="myfolder/mypage.html" appendQueryString="true" redirectType="Permanent" />
</rule>
及以下
<rule name="myNewRedirect" stopProcessing="true">
<match url="(.*)"/>
<conditions>
<add input="{QUERY_STRING}" pattern="cbp=http://www.example.com/myfolder/mypage" />
</conditions>
<action type="Redirect" url="/myfolder/mypage.html" redirectType="SeeOther"/>
</rule>
但没有上述的正常工作。