| Description | This article describes the steps to use the FortiAppSec Cloud WAF Rewriting Requests policy rule to redirect the root URL directory to subdirectory. |
| Scope | FortiAppSec Cloud WAF. |
| Solution |
The FortiAppSec Cloud WAF Rewriting Requests module feature can be used to add rewrite/redirect rules to redirect website URL requests. In the case of a FortiAppSec Cloud WAF application website that requires redirecting from the root directory '/' to a subdirectory '/sub', this can be achieved by adding a rewrite/redirect rule.
Name: Use an identical name. Actions: Select 'Rewrite URL'. Rewrite From: ^/$.
This is Regular Expressions syntax; the regex used matches only the root '/' directory.
Rewrite to: /subURL-directory. Insert the destination URL directory to be redirected to. Protocol Filter: Optional, may leave it in default settings.
Related document: Rewriting Requests |
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2025 Fortinet, Inc. All Rights Reserved.