-2

我有一个主域为 www.solkey.ir 的站点。

我停放了 www.solkey.co,但因为主域有 ssl 而停放域没有 ssl,所以您无法打开 www.solkey.co(它在浏览器中显示 ssl 安全警报,如下图所示)。

我连接到我的主机,他们说你必须在 htaccess中重定向https://solkey.co >>>>> http://solkey.co 。但我不知道该怎么做。

下面是我的 htaccess 代码。

如何将 solkey.co(使用 https)重定向到 solkey.co(使用 http)

# BEGIN WordPress

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /

RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]


RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

</IfModule>

# END WordPress
4

1 回答 1

0

由于其他域没有 SSL 配置,您一定会收到错误消息。但是,您尝试做的事情还有另一种选择。而不是尝试在服务器上设置重写规则。您可以按照此处所述配置域转发: https ://in.godaddy.com/help/forward-a-domain-12123

显然,此功能适用于通过 GoDaddy 购买的域名。我假设其他 DNS 提供商也有类似的功能。

于 2017-06-27T09:32:29.087 回答