【发布时间】:2020-05-20 09:19:39
【问题描述】:
我已经在 IIS 服务器上配置了我们的 wordpress 网站。 我们有一个带有 SSL 的域名,我已经将我的网站从本地 URL 配置(与 mysql URL 绑定)到实时域 URL。 我还在 wp.config 文件中使用以下规则将 http 重定向到 https:
<rules>
<rule name="Incomegenius.net" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTPS}" pattern="^OFF$" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}{REQUEST_URI}" appendQueryString="false" />
</rule>
</rules>
借助上述重定向,我们可以正确地从 http 重定向到 https URL。 但是,当我试图在没有任何 http 或 https(仅网站名称)的情况下访问我们的网站 URL 时,它会重定向到 IIS Windows Server 页面为什么? 所以,我想,当有人只在地址栏中键入网站 URL(例如 google.com)时,没有 http 或 https,所以它不会重定向到 IIS windows Server 页面。
我还需要设置更多重定向吗?或者还有什么需要做的,请提出建议。
【问题讨论】:
标签: php wordpress redirect iis-8 windows-server-2012