Working with redirections
Integrate your web services behind a Load Balancer with redirections
Integrate your web services behind a Load Balancer with redirections
The OVH Load Balancer acts by default as a proxy. It can also be configured to redirect your customers to a third-party website, which is useful if you are changing your domain name, or want to redirect your customers to your website’s HTTPS version, for example. This is known as HTTP redirection.
This guide will show you how to to integrate your web services behind an OVH Load Balancer with redirections.
A HTTP redirection is presented as follows:
HTTP/1.1 301 Moved Permanently
Location: http://www.example.org/
Content-Type: text/html
Content-Length: 174
Custom redirections should have the following form: <scheme>://<net_loc>/<path>;<params>?<query>#<fragment>
. You can only specify one redirection per front-end.
Custom redirections can be specified via the OVH Control Panel and via the API, both on new and existing front-ends
.
You can define custom redirections from the OVH Control Panel by going to the Cloud
section, then Load Balancer
.
You can either do this on a new front-end as you create it, or on an existing front-end.
In the Front-ends
section of the OVH Control Panel, click on Add a front-end
to create a new one.
In the editing page for a front-end, select HTTP
or HTTPS
protocol. Configure the information as requested. However, please note that there is no need to set a Default farm
, as it will not be used.
In the advanced settings, enter the HTTP redirection
.
In the Front-ends
section of the OVH Control Panel, select the front-end you would like to edit. To do this, click the ...
button, then select Edit
in the menu that appears. Please ensure that the front-end you have chosen uses either HTTP
or HTTPS
protocol.
In the editing page for the front-end, complete the configuration if needed. However, please note that there is no need to set a Default farm
, as it will not be used.
In the advanced settings, enter the HTTP redirection
.
Once the front-end has been configured, click Add
or Edit
, depending on whether you are configuring a new or existing front-end. Please remember to deploy the configuration. There are two ways of doing this:
via the Status
section of the OVH Control Panel, by clicking on your Load Balancer’s ...
button, then selecting Apply configuration
via the reminder box in the OVH Control Panel, notifying you that the configuration has not been applied, by clicking Apply configuration
In the OVH API, redirections are specified in the redirectLocation character chain.
Setting | Meaning |
---|---|
serviceName | Your Load Balancer service ID |
port | Front-end listening ports |
zone | Front-end deployment zones |
redirectLocation | HTTP redirection URL |
Setting | Meaning |
---|---|
serviceName | Your Load Balancer service ID |
frontendId | ID of the front-end to be updated |
redirectLocation | HTTP redirection URL |
Then apply the modifications:
Setting | Meaning |
---|---|
serviceName | Your Load Balancer service ID |
zone | Front-end deployment zones |
Join our community of users on https://community.ovh.com/en/.
Please feel free to give any suggestions in order to improve this documentation.
Whether your feedback is about images, content, or structure, please share it, so that we can improve it together.
Your support requests will not be processed via this form. To do this, please use the "Create a ticket" form.
Thank you. Your feedback has been received.
Access your community space. Ask questions, search for information, post content, and interact with other OVHcloud Community members.
Discuss with the OVHcloud community