On the Web Application Firewall > Request Redirection tab you can define to which URL incoming requests are redirected. This allows you to have websites with multiple domain names, shorten URLs and prevent broken links after a website was moved. For example, if your company changes the name and has a new URL, visitors can reach the new website via the old URL which gets redirected.
Note – The Request Redirection tab can only be accessed after at least one virtual webserver has been created.
To create a request redirection, proceed as follows:
Click the New Request Redirection button.
The Add Request Redirection dialog box opens.
Make the following settings:
Name: Enter a descriptive name for the request redirection.
Virtual webserver: Select the original target host of the incoming traffic.
Path: Enter the path for which you want to create the request redirection, e.g., /home.
Host: Enter the URL where the path should lead to, e.g., www.sophos.com.
Protocol: Select if the connection to the host should be established using Plaintext (HTTP) or Encrypted (HTTPS).
Port: Enter a port number where the host can be reached from outside your network. Default is port 80 with Plaintext (HTTP) and port 443 with Encrypted (HTTPS).
Response Code: Select the response code for the request redirection. Every HTTP or HTTPS request needs a response code. Sophos UTM offers the following options:
- Move Permanently (301): This and all future requests should be directed to the given URL.
- Found (302): The request resides temporarily under a different URL.
- See Other (303): The request should be redirected to another URL (GET method).
- Temporary Redirect (307): The request should be repeated with another URL. Future requests should still use the original URL.
- Permanent Redirect (308): The request and all future requests should be repeated using another URL.
Note – For more information about response codes, please visit the HTTP Status Codes website.
Comment (optional): Add a description or other information.
The request redirection is added to the Request Redirection list.
Enable the request redirection.
The new request redirection is disabled by default (toggle switch is gray). Click the toggle switch to enable the request redirection.
The request redirection is now enabled (toggle switch is green).
To either edit or delete a request redirection, click the corresponding buttons.