gpt4 book ai didi

.htaccess - 如何修复错误 ERR_TOO_MANY_REDIRECTS .htaccess?

转载 作者:太空宇宙 更新时间:2023-11-03 14:50:12 25 4
gpt4 key购买 nike

我已经有一个 SSL 证书处于事件状态,但想强制使用 https,并且已经尝试过多个规则,但总是产生相同的错误。

我的规则:

RewriteEngine on

RewriteCond %{HTTPS} !=on [NC]

RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [R,L]

Error

Error 2

最佳答案

重定向对我有用。确保您没有任何缓存结果。

➜  ~  curl -i www.ingmega.com/syspagos
HTTP/1.1 301 Moved Permanently
Date: Tue, 02 Feb 2016 19:22:12 GMT
Server: Apache
Location: https://syspagos.ingmega.com
Content-Length: 236
Content-Type: text/html; charset=iso-8859-1

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>301 Moved Permanently</title>
</head><body>
<h1>Moved Permanently</h1>
<p>The document has moved <a href="https://syspagos.ingmega.com">here</a>.</p>
</body></html>

➜ ~ curl -i https://syspagos.ingmega.com
curl: (60) SSL certificate problem: self signed certificate
More details here: http://curl.haxx.se/docs/sslcerts.html

curl performs SSL certificate verification by default, using a "bundle"
of Certificate Authority (CA) public keys (CA certs). If the default
bundle file isn't adequate, you can specify an alternate file
using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
the bundle, the certificate verification probably failed due to a
problem with the certificate (it might be expired, or the name might
not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
the -k (or --insecure) option.

但是,请注意您的站点返回的是自签名证书。您提供的证书不受信任。

关于.htaccess - 如何修复错误 ERR_TOO_MANY_REDIRECTS .htaccess?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35156778/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com