Technical Tip: How to configure FortiAppSecCloud WAF Rewriting Requests module feature to redirect root URL directory to sub directory
| 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 |




