301通过web.config重定向到Wordpress站点

时间:2014-11-18 23:06:36

标签: wordpress redirect web-config url-redirection

我尝试通过web.config执行简单的301页面指示,但由于某种原因它无法正常工作。任何帮助将不胜感激。

<?xml version="1.0" encoding="UTF-8"?>
  <configuration>
    <system.webServer>
      <rewrite>
        <rules>
          <rule name="wordpress" patternSyntax="Wildcard">
            <match url="*"/>
              <conditions>
                <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true"/>
                <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true"/>
              </conditions>
            <action type="Rewrite" url="index.php"/>
          </rule>
        </rules>
      </rewrite>
    </system.webServer>
    <location path="index_1.html">
      <system.webServer>
        <httpRedirect enabled="true" destination="http://newurl.com" httpResponseStatus="Permanent" />
    </system.webServer>
  </location>
</configuration>

0 个答案:

没有答案