Skip to main content
AACastillo
Staff
Staff
November 28, 2025

Technical Tip: URL redirection adding www to a URL in FortiAppSec Cloud

  • November 28, 2025
  • 0 replies
  • 191 views
Description This article describes how to add 'www' at the beginning of a URL, configuring Rewriting Requests in the Application Delivery settings of FortiAppSec Cloud.
Scope FortiAppSec Cloud.
Solution

In some published web services in the WAF of FortiAppSec Cloud, adding 'www' to the web service's URL it is needed, like 'https://websiteapp.com' to 'https://www.websiteapp.com'. To do it, it is necessary to enable Rewriting Requests first in the Application Delivery settings of the configured application.

 

To add the Rewriting Requests module, go to WAF -> Application and select the desired application; after that, select WAF in the side navigation bar and then Add Module. Go to Application Delivery and enable the Rewriting Requests feature; to finish, select OK. Feature Application Delivery -> Rewriting Requests should appear in the side navigation bar.

 

01a.png

 

After enabling the Rewriting Requests feature, a URL redirection rule should be created. Select Application Delivery -> Rewriting Requests, then go to URL Rewrite Configuration and select Add Rule:

 

02a.png

 

In Add Rule, configure the following settings:

  • Name: Rule name (Write any name, preferably without spaces).
  • Action: Redirect Advanced (301 Permanently).

 

Rewriting Conditions:

  • Match Host: '^websiteapp.com$'.
  • Match URL: '^/(.*)$'.
  • Match Referer and Protocol Filter: Left both disabled.

 

Rewriting Behavior:

Rewrite Location: 'https://www.websiteapp.com/$0'.

 

After that, select OK:

 

03a.png

 

Once the URL redirection rule is created, it is listed in the URL Rewrite rules list:

 

04a.png

 

If other rules were created previously and web traffic matches one of them, move the URL redirection rule above or below based on the detected traffic.

 

Related documents:
Rewriting Requests