FortiWeb
A FortiWeb can be configured to join a Security Fabric through the root or downstream FortiGate.
AACastillo
Staff
Staff
Article Id 336822
Description This article describes how to configure a basic web redirection from a specific website A published by FortiWeb to another website B.
Solution Problem summary:
Sometimes web traffic to a website published by a FortiWeb (for example, www.website-internet1.com) must be redirected to another different website (like www.another-webpage.com); in this case a URL Rewriting configuration can solve this basic redirection.

  1. Go to Application Delivery -> URL Rewriting, select URL Rewriting Rule, then select Create New.

01a.png

 

 

  1. Configure the initial rule's settings:

Name: Write any name (preferably without spaces)
Action Type: Request Action
Request Action: Redirect (301 Permanently)

After that, select OK.


02a.png

  1. In URL Rewriting Condition Table, select Create New (check that the Create New button will be disabled until the point 2 configurations are saved).

 

03a.png

 

 

  1. In New URL Rewriting Condition, configure the following settings:

Object: HTTP Host
Regular Expression: Write ONLY THE HOST NAME; in this example is www.website-internet1.com (Do not write the protocol (like https://) or the URL (everything that comes after / ))
Protocol Filter: Disable
Meet this condition if: Object matches the regular expression and the protocol filter

After that, select OK.

 

04a.png

 

  1. In URL Rewriting Condition Table, verify the HTTP Host object was created and listed. After that, select Create New.

05a.png

 

 

 

  1. In New URL Rewriting Condition, configure the following settings:

Object: HTTP URL
Regular Expression: ^/$
Protocol Filter: Disable
Meet this condition if: Object matches the regular expression and the protocol filter

After that, select OK.


06a.png

 

 

  1. In URL Rewriting Condition Table, verify the HTTP Host object and then the HTTP URL object are listed in that order.

07a.png

 

 

  1. Then, go to Replacement Location field, and configure:

Location: Write the web site where the traffic will be redirected. In this case, write the initial protocol (HTTP or HTTPS) and the complete host name (also it's possible to add the complete URL). In this example, Location is https://www.another-webpage.com.

When it's finished, select OK.


08a.png

 

 

  1. The created rule must be configured in a URL Rewriting Policy to be used in a Web Protection Profile. Go to Application Delivery -> URL Rewriting, select URL Rewriting Policy and select Create New.

09a.png

 

 

  1. Write a name for the New URL Rewriting Policy and then select OK.

 

10a.png

 

  1. Select Create New. In New URL Rewriting Item -> Rewriting Rule Name, choose the created URL Rewriting Rule, and leave Continue executing the next rule disabled. After that, select OK.


11a.png

 

  1. The URL Rewriting Policy to make this basic web redirection is ready to configure in a Web Protection Profile. Go to Policy -> Web Protection Profile, select a protection profile (or create a new one), go to Application Delivery and in URL Rewriting select the created URL Rewriting Policy.


12a.png



IMPORTANT: Keep in mind this is the configuration of a basic redirection from a website A published by FortiWeb to another website B. If a more complex URL direction is needed, it could be necessary to use regular expressions in different parts of the URL redirection configuration. See the following documents about FortiWeb's URL Redirections and Regular expressions:

Contributors