0
嘛,我不是良好的英語居然讓我無法解釋短期的標題我的問題......重寫URL查詢字符串看起來像目錄
不久,我需要讓
http://<SITE>/user/?id=<x>
到
http://<SITE>/id<x>
使用web.config文件是否有可能在微軟的Azure?
嘛,我不是良好的英語居然讓我無法解釋短期的標題我的問題......重寫URL查詢字符串看起來像目錄
不久,我需要讓
http://<SITE>/user/?id=<x>
到
http://<SITE>/id<x>
使用web.config文件是否有可能在微軟的Azure?
裏面你的web.config,你應該內部<system.webServer>
部分插入此規則:
<rewrite>
<rules>
<rule name="Redirect for user" stopProcessing="true">
<match url="^user" />
<conditions>
<add input="{QUERY_STRING}" pattern="id=(\d+)" />
</conditions>
<action type="Redirect" url="/id/{C:1}" appendQueryString="false" />
</rule>
</rules>
</rewrite>
它會像http://<SITE>/user/?id=<x>
網址重定向到http://<SITE>/id<x>
其中<x>
是數字