https 到 http 重定向
我到处寻找,但仍然找不到任何答案。
我正在尝试将例如: https://www.domain.com 重定向到 http://www.domain.com
目前我有一个 .htaccess
文件,其中包括:
Options +FollowSymlinks RewriteEngine on RewriteBase / RewriteCond %{SERVER_PORT} ^443$ [OR] RewriteCond %{HTTPS} =on RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L]
但我不断收到以下内容错误:
An error occurred during a connection to www.domain.com. SSL received a record that exceeded the maximum permissible length. (Error code: ssl_error_rx_record_too_long)...
我需要在 VirtualHost *:443 的虚拟主机文件中添加任何内容吗?对于domain.com - 抱歉,对此很陌生。任何帮助/指导将不胜感激,谢谢!
I have searched everywhere and still can't find any answers.
I'm trying to redirect eg: https://www.domain.com to http://www.domain.com
Currently I have a .htaccess
file which includes:
Options +FollowSymlinks RewriteEngine on RewriteBase / RewriteCond %{SERVER_PORT} ^443$ [OR] RewriteCond %{HTTPS} =on RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L]
But I keep receiving the following error:
An error occurred during a connection to www.domain.com. SSL received a record that exceeded the maximum permissible length. (Error code: ssl_error_rx_record_too_long)...
Do I need to add anything to my vhost file for VirtualHost *:443? for domain.com - Apologies, quite new to this. Any help/direction would be greatly appreciated, thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要拥有完全正常工作的 https 虚拟主机。请在此处粘贴您的虚拟主机中的内容。
如果 http 和 https 使用相同的虚拟主机,事情可能会变得混乱。顺便说一句,您的证书必须具有
www.domain.com
的 CNAME,或者如果您有通配符*.domain.com
。还有一件事,您在这里不需要任何RewriteCond
因为您重写了每个 https 请求。You need to have fully working https vhost. Please paste here what you have in your vhost.
If you have the same vhost for http and https things can get messy. Btw your cert must have CNAME for
www.domain.com
or if you have wildcard*.domain.com
. And one more thing, you don't need anyRewriteCond
here because you rewrite every https request.