首页 > 解决方案 > 无论如何我可以在 web.config 文件中将网站从 .co.uk 更改为 .com

问题描述

我已经在 web 配置文件中放入了这个 http 重定向,但我不断收到一个重定向循环。该网站是一个 wordpress 网站,托管在 IIS7.5 上,值得一提的是,我安装了一个名为非常简单的 ssl 的插件来处理 https 重定向。

我将在下面附上我的 web.config 文件

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<staticContent>
<mimeMap fileExtension=".woff" mimeType="application/x-font-woff" />
</staticContent>
<rewrite>
  <rules><rule name="Main Rule" stopProcessing="true"><match url=".*" /> 
  <conditions logicalGrouping="MatchAll"><add input="{REQUEST_FILENAME}" 
  matchType="IsFile" negate="true" /><add input="{REQUEST_FILENAME}" 
  matchType="IsDirectory" negate="true" /></conditions><action 
 type="Rewrite" url="index.php" /></rule>
        <rule name="WordPress: http://www.google.com" 
 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>
<httpRedirect enabled="true" destination="http://www.google.com" httpResponseStatus="Permanent" />
    <security>
        <requestFiltering>
            <denyUrlSequences>
                <add sequence="xmlrpc.php" />
            </denyUrlSequences>
            <requestLimits maxAllowedContentLength="50000000" />
        </requestFiltering>
    </security>
  <handlers>
    </handlers>
  </system.webServer>
 </configuration>

标签: wordpresswebconfigiis-7.5

解决方案


推荐阅读