wordpress - 无论如何我可以在 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>
解决方案
推荐阅读
- excel - VBS - 如何获取文件名的今天日期?
- perl - 如何存储和检索 perl 对象
- linux - 记录 Bash 交互,分别保存 STDIN、STDOUT
- html - 仅在图标而不是名称上切换类别导航
- android - 单击 ActionBar 菜单项时带有 Android ActionBar 的弹出对话框
- javascript - 使用 Node.js 将 createWriteStream txt 内容写入全局变量
- r - 将 ifelse() 添加到 Map 函数中
- crystal-lang - 重新启动“琥珀表”时记录全部删除
- python - Raspberry Pi 距离传感器的追溯
- uwp - 使用 WritableBitmap 时抛出 ObjectDisposedException