你如何重定向HTTPS到HTTP? [英] How do you redirect HTTPS to HTTP?
问题描述
你怎么重定向到HTTPS HTTP?也就是说,(貌似)每个人的教导相反。
How do you redirect HTTPS to HTTP?. That is, the opposite of what (seemingly) everyone teaches.
我有一个HTTPS服务器,这是我付的SSL认证和镜子,我还没有和保持周围只是突发事件,因此不值得获得了认证。
I have a server on HTTPS for which I paid an SSL certification for and a mirror for which I haven't and keep around for just for emergencies so it doesn't merit getting a certification for.
在我的客户的桌面我有一些它的快捷方式指向的http:// production_server
和 https://开头production_server
(都工作)。但是,我知道,如果我的生产服务器出现故障,那么在DNS转发踢和那些具有HTTPS在他们的快捷方式将在 HTTPS盯着客户:// mirror_server
(不工作)和大发的Internet Explorer 7的红色uneasyness为我公司的屏幕。
On my client's desktops I have SOME shortcuts which point to http://production_server
and https://production_server
(both work). However, I know that if my production server goes down, then DNS forwarding kicks in and those clients which have "https" on their shortcut will be staring at https://mirror_server
(which doesn't work) and a big fat Internet Explorer 7 red screen of uneasyness for my company.
不幸的是,我不能只在客户端级别切换这周围。这些用户都非常计算机文盲:和很可能看不到HTTPS不安全的错误吓坏了(尤其是道路的Firefox 3和Internet Explorer 7处理它现在:句号,那种令人欣慰,但不能帮助我在这里大声笑)。
Unfortunately, I can't just switch this around at the client level. These users are very computer illiterate: and are very likely to freak out from seeing HTTPS "insecurity" errors (especially the way Firefox 3 and Internet Explorer 7 handle it nowadays: FULL STOP, kind of thankfully, but not helping me here LOL).
这是很容易的to找到 Apache的解决方案了解<一个href=\"http://www.google.com/search?q=https+redirection&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla%3aen-US%3aofficial&client=firefox-a\">http->https重定向,但对我的生活,我不能做相反的事情。
It's very easy to find Apache solutions for http->https redirection, but for the life of me I can't do the opposite.
想法?
推荐答案
这还没有测试过,但我认为这应该工作使用mod_rewrite
This has not been tested but I think this should work using mod_rewrite
RewriteEngine On
RewriteCond %{HTTPS} on
RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI}
这篇关于你如何重定向HTTPS到HTTP?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!