What is the best way to always reroute all traffic from http to https on Apache 2?
All requests to 80 should go to 443.
(I am using Ubuntu + Apache 2)
|
What is the best way to always reroute all traffic from http to https on Apache 2? All requests to 80 should go to 443. (I am using Ubuntu + Apache 2)
| |||
feedback
|
|
Expanding on freiheit's answer, removing some redundant parts, eliminating the dependence on mod_rewrite (and associated speed penalty), and adding in some security:
| |||
|
feedback
|
|
Personally, my favorite is to simply redirect all port 80 traffic to port 443:
| |||||
feedback
|
| |||
|
feedback
|