[英]How can I correctly rewrite a URL with .aspx to a URL without .aspx?
[英]How can I configure url rewrite to redirect from splash.aspx?page=3 to splash3.aspx?
我已經創建了一個關於查詢字符串的主題,不幸的是這個問題已經關閉,沒有人再回答了。
例如,我想從 splash.aspx?page=3 重定向到一個更簡單的 url,例如 splash3.aspx。 不幸的是,我沒有查詢字符串可以響應的后端代碼,所以我需要一個替代方案。 如何配置 url 重寫?
在您的 web.config 中,添加以下節點:
<rewrite>
<rule name="Redirect splash page 3" stopProcessing="true">
<match url="splash\.aspx$" />
<conditions>
<add input="{QUERY_STRING}" pattern="page=3" />
</conditions>
<action type="Redirect" url="splash3.aspx" redirectType="Temporary" />
</rule>
</rewrite>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.