HTTP Redirection to HTTPS
Scenarios
HTTPS is an extension of HTTP. HTTPS encrypts data between a web server and a browser.
If you enable redirection, all HTTP requests to your website are transmitted over HTTPS connections to improve service security.
HTTP requests are forwarded to the HTTPS listener as HTTPS requests, which are then routed to backend servers over HTTP.
Prerequisites
- An HTTPS listener has been added.
- An HTTP listener has been added.
Creating a Redirect
- Log in to the management console.
- In the upper left corner of the page, click
and select the desired region and project. - Hover on
in the upper left corner to display Service List and choose Network > Elastic Load Balancing. - Locate the load balancer and click its name.
- Click Listeners, locate the HTTP listener, and click its name.
- Click Redirects and then Create on the right.
Table 1 Parameters for configuring redirectionParameter
|
Description
|
Example Value
|
Name
|
Specifies the redirect name.
|
redirect-g8h9
|
Redirected To
|
Specifies the HTTPS listener to which requests are redirected.
|
N/A
|
Description
|
Provides supplementary information about the redirect.
|
N/A
|
- Click OK.
- If you create a redirect for an HTTP listener, its settings will not take effect except access control.
- If you create a redirect for an HTTP listener, the load balancer will return HTTP 301 Move Permanently to the clients.
Modifying a Redirect
- Log in to the management console.
- In the upper left corner of the page, click
and select the desired region and project. - Hover on
in the upper left corner to display Service List and choose Network > Elastic Load Balancing. - Locate the load balancer and click its name.
- Click Listeners, locate the HTTP listener, and click its name.
- Click Redirects, locate the redirect, and click Modify in the Operation column.
- In the Modify Redirect dialog box, modify the redirect name or description, or select another listener, and click OK.
Deleting a Redirect
- Log in to the management console.
- In the upper left corner of the page, click
and select the desired region and project. - Hover on
in the upper left corner to display Service List and choose Network > Elastic Load Balancing. - Locate the load balancer and click its name.
- Click Listeners, locate the listener, and click its name.
- Click Redirects, locate the redirect, and click Delete in the Operation column.
- In the Delete Redirect dialog box, click Yes.
Parent topic: Advanced Features of HTTP/HTTPS Listeners