我应该如何消除使用 .htaccess 访问 https 中的停放域时出现的 SSL 错误?
我是 .htaccess 的初学者,我需要帮助。我们有这个网站及其 https 中的商店模块。我们还有一个指向该网站的停放域名。问题是,当我在地址栏中输入“https://www.parked_domain_name.com/store/”时,出现 SSL 错误。但是,当我在地址栏上输入“http://www.parked_domain_name.com/store/”时,它会重定向到“https://www.parked_domain_name.com/store/”,而不会出现任何 SSL 错误。当我在地址栏中输入“https://www.parked_domain_name.com/store/”时,如何查看没有 SSL 错误的商店?
I'm a beginner in .htaccess and I need help. We have this website with its store module in https. We also have a parked domain pointing to this website. The problem is, when I type "https://www.parked_domain_name.com/store/" in the address bar, I get an SSL error. However, when I type "http://www.parked_domain_name.com/store/" on the address bar, it redirects to "https://www.parked_domain_name.com/store/" without getting any SSL errors. How can I view the store w/o SSL errors when I type "https://www.parked_domain_name.com/store/" in the address bar?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
一般来说,您只能在站点的单个域名上运行 HTTPS。
也有例外,例如 *.example.org 的证书允许您在 www.example.org 和 web.example.org 子域上运行 HTTPS。此外,一些证书提供商将为固定的多个域名列表颁发证书。
但通常情况下,一个IP地址只能有一张证书,一张证书只能有一个域名。
您所描述的 http URL 在没有警告的情况下重定向 https URL 的行为听起来不太可能。也许尝试几种不同的浏览器 - 它们在这方面的表现都略有不同。您如何到达该 URL 并不相关。如果您通过 HTTP 访问 example.org 并且证书显示 anotherdomain.com,那么您将收到 SSL 警告。
您最好仅在 https://example.org/ 上运行该网站并将任何其他域重定向到该域,而不是从多个域托管该网站。
我希望这有帮助。
In general, you can only have HTTPS running on a single domain name for a site.
There are exceptions, for example a certificate for *.example.org would let you run HTTPS on both www.example.org and web.example.org subdomains. Also, some certificate providers will issue certificates for a fixed list of several domain names.
But in common usage, one IP address can have only one certificate, and one certificate can have only one domain name.
The behaviour you describe of the http URL redirecting the the https URL without warnings does not sound like it is possible. Perhaps try a few different browsers - they all act a bit differently on this front. How you reached the URL is not relevant. If you access example.org over HTTP and the certificate says anotherdomain.com then you will get SSL warnings.
You're best off running the site only on e.g. https://example.org/ and redirecting any other domains to that one, rather than hosting the site from multiple domains.
I hope this helps.