Configuring the redirection feature
This feature redirects all HTTP request packets matching a virtual server to the specified URL.
To configure the redirection feature:
Step | Command | Remarks |
---|---|---|
1. Enter system view. | system-view | N/A |
2. Enter HTTP virtual server view. | virtual-server virtual-server-name | N/A |
3. Enable the redirection feature and specify a redirection URL for the virtual server. | redirect relocation relocation | By default, the redirection feature is disabled for the virtual server. |
4. Specify the redirection status code that the LB device returns to a client. | redirect return-code { 301 | 302 } | By default, the redirection status code that the LB device returns to a client is 302. This configuration takes effect only when the redirection feature is enabled for the virtual server. |