.htaccess force redirect of https://www to https:// not working

时间:2016-02-12 21:42:41

标签: wordpress apache .htaccess redirect

I know there are a ton of the posts concerning this very issue, but I cannot for the life of me get it to work.

The non-https www or non-www redirects work fine, but I cannont get the https://www redirect to work without getting the untrusted certificate warning.

My .htaccess file:

[ x for x in facets if not (x==i).all()]

I have cleared the cache and retested to no avail.

Any ideas?

Thanks!

1 个答案:

答案 0 :(得分:2)

这是一个常见的捕获22。您需要重定向到正确的主机名以匹配您的SSL证书,但是,必须在执行任何重写之前建立SSL握手。在建立SSL握手和tcp连接之前,大多数网络服务器的配置都不可用...包括重写。

最常用的方法是使用通配符和/或SAN证书来容纳多个主机名。

您可以找到许多涵盖此内容的文章,但以下内容相当不错:

http://www.jasonsamuel.com/2011/03/07/how-to-properly-use-ssl-redirects-without-getting-certificate-error-messages/