How to Redirect HTTP Requests to HTTPS?
About
What is Redirecting HTTP Requests to HTTPS?
The Hypertext Transfer Protocol (HTTP) is the common language used by web servers and web browsers to communicate over the internet. Websites consist of many files, both large and small. When a request is made, these files need to be transferred quickly. Since FTP is insufficient for this task, the HTTP protocol was defined. In general, the HTTP protocol uses TCP port 80 for internet communication.
The HTTPS protocol, on the other hand, works as an addition to the SSL/TLS and TCP layers. It can be applied to many protocols that use TCP. In other words, HTTPS refers to encrypting the communication between websites, which is normally in "clear text," using certificates to enhance security.
Since the HTTP protocol communicates in "clear text," it is not secure. To improve security, HTTP requests coming to the web servers' HTTP port can be redirected to HTTPS through TR7 ASP, both automatically and manually.
Interface
HTTP/HTTPS Redirect (Automatic)
Step > 1
For automatic HTTPS redirection, the edit screen of the relevant vService is opened. After defining port 443, the SSL status is set to Terminate or HTTP/2.0, and a certificate is selected.
For port 80, selecting Redirect will configure automatic HTTPS redirection.
The changes are applied by clicking the "Save" button.
Control
Automatic Redirect Control
When a request is made to the relevant vService via "http" in the browser, it will be automatically redirected to HTTPS by TR7.
Interface
HTTP/HTTPS Redirect (Manuel)
Step > 1
For manual HTTPS redirection, follow the steps "Traffic Manager > Traffic Manipulation > Actions > Add" in the TR7 web management interface. Select "Redirect to HTTPS" as the Action Type.
After setting the "Redirect Scheme Code" as desired, the conditions under which the request will be redirected to HTTPS are determined through the Conditions tab. For example, the Path condition is selected, and /login.php is entered, followed by adding another condition, If SSL is NOT terminated.
Step > 2
The edit screen of the relevant vService opens. Since manual HTTPS redirection will be applied, the "Redirect" option next to port 80 is changed to "None".
By activating "Details > Actions", the "Redirect to HTTPS" action is selected, and the changes are applied by clicking the "Save" button.