如何使用参数在asp.net中将URL重写为子域
我使用“重写url 2.0”将如何使用参数在asp.net中将URL重写为子域,url,rewrite,Url,Rewrite,我使用“重写url 2.0”将abc.com/default.aspx?shop=123重写为123.abc.com 我的代码 <rewrite> <rules> <rule name="domain redirect" stopProcessing="true"> <match url="^(.*)$" /> <conditions trackAllCaptures="tr
abc.com/default.aspx?shop=123
重写为123.abc.com
我的代码
<rewrite>
<rules>
<rule name="domain redirect" stopProcessing="true">
<match url="^(.*)$" />
<conditions trackAllCaptures="true">
<add input="{HTTP_HOST}" pattern="^(.+)\.abc\.com$" />
</conditions>
<action type="Rewrite" url="{REQUEST_URI}?shop={C:1}" appendQueryString="true"/>
</rule>
</rules>
</rewrite>
我怎样才能重写
abc.com/default.aspx?shop=123&title=456&id=789
到
123.abc.com/456/789.html
来自
abc.com/view.aspx?shop=123&id=456
到
123.abc.com/view/456.html
?我已经编辑了这篇文章!你能帮我吗?我没有重写url 2.0,所以我帮不了你。不过,希望其他人能做到。