FortiWeb
A FortiWeb can be configured to join a Security Fabric through the root or downstream FortiGate.
Ahmed_Galal
Staff
Staff
Article Id 333792
Description This article describes how to perform redirection for the domain only and keep the URI using FortiWeb feature URL Rewriting.
Scope FortiWeb.
Solution

In the scenario below, all connections going to Google will be redirected to YouTube. However, the URL will not be changed. For example, google.com/login will be redirected to youtube.com/login

 

  1. Navigate to Application Delivery -> URL Rewriting -> URL Rewriting Rule and create a new rule with the following options:
  • Action Type: Request Action.
  • Request Action: Redirect (301 Permanently).
  • URL Rewriting Condition Table: HTTP Host: Regular Expression: ^domain.com$.
  • URL Rewriting Condition Table: HTTP URL: Regular Expression: (.*).
  • Replacement Location: https://newdomain.com$0

.

Screenshot 2024-08-16 135238.png

 

Note: domain.com is the current domain to redirect to a new domain. 

 

  1. Assign the configured Rule to a URL Rewriting Policy by navigating to Application Delivery -> URL Rewriting -> URL Rewriting Policy, select Create a new URL rewriting policy, and assign the rule just configured in the 1st step.

 

Screenshot 2024-08-16 140312.png

 

  1. Assign the configured URL Rewriting Policy to the Web Protection Profile assigned to the related Security Policy by navigating to Policy -> Web Protection Profile, opening the WPP related to the policy, and assigning the URL Rewriting Policy.

 

Screenshot 2024-08-16 140704.png

 

Related document:
Rewriting & redirecting