【问题标题】:How can I redirect site to site use web.config?如何使用 web.config 将站点重定向到站点?
【发布时间】:2019-10-04 08:31:52
【问题描述】:

我可以将我网站的所有页面重定向到新网站吗?

<rule name="301 Redirect 1" stopProcessing="true">
            <match url="(.*)" />
    <conditions>
                <add input="{HTTPS}" pattern="off" ignoreCase="true" />
    </conditions>
  <action type="Redirect" url="https://take-car.ru{REQUEST_URI}" redirectType="Permanent" />
</rule>

但它不起作用

【问题讨论】:

    标签: redirect iis web-config


    【解决方案1】:
    <rule name="301 Redirect 1" stopProcessing="true">
                <match url="(.*)" />
        <conditions>
    <add input="{HTTP_HOST}" pattern="omegaprokat.ru" />
        </conditions>
      <action type="Redirect" url="https://take-car.ru{REQUEST_URI}" redirectType="Permanent" />
    </rule>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2023-01-20
      • 2015-05-30
      • 2012-04-18
      • 1970-01-01
      • 2014-08-18
      • 2021-09-07
      • 1970-01-01
      • 2017-07-25
      相关资源
      最近更新 更多