Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/url/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何使用参数在asp.net中将URL重写为子域_Url_Rewrite - Fatal编程技术网

如何使用参数在asp.net中将URL重写为子域

如何使用参数在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

我使用“重写url 2.0”将
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,所以我帮不了你。不过,希望其他人能做到。