Fortinet white logo
Fortinet white logo

CLI Reference

waf machine-learning url-replacer-rule/policy

waf machine-learning url-replacer-rule/policy

Use this command to enable the machine learning feature and configure its settings.

Syntax

config waf machine-learning url-replacer-rule

edit url-replacer-rule_name

set type {pre-defined | custom-defined}

set app-type {jsp | owa-2003}

set url-replacer-policy_name

set url "<url_str>"

set new-url "<new-url_str>"

set param "<param_str>"

set new-param "<new-param_str>"

next

end

config waf machine-learning url-replacer-policy

edit url-replacer-policy_name

config rule list

edit rule-id "<rule_id>"

set type URL_Replacer

set plugin-name "<plugin-name_str>"

next

end

next

end

Variable Description Default

url-replacer-rule_name

Specify a unique name that can be referenced by other parts of the configuration.
The name can be up to 63 characters long with no space or special character.

No default.

type {pre-defined | custom-defined}

Select either of the following:
  • Predefined—Use one of the predefined URL replacers which can be selected from the Application Type below.

  • Custom-Defined—Define your own URL replacer by configuring the URL Path, New URL, Param Change, and New Param fields below.

No default.

app-type {jsp | owa-2003}

If you have selected Predefined in the Type field above, then you must click the down arrow and select either of the following from the list menu:
  • JSP—Use the URL replacer designed for Java server pages (JSP) web applications, where parameters are often separated by semi-colon (;).

  • OWA 2003— Use the URL replacer designed for default URLs in Microsoft Outlook Web App (OWA), where user name and directory parameters are often embedded within the URL, as illustrated below:

    (^/public/)(.*)
    (^/exchange/)([^/]+)/*(([^/]+)/(.*))*
    These two application types are predefined URL interpreter plug-ins used by popular web applications.
No default.

url "<url_str>"

Enter a regular expression, such as (^/[^/]+)/(.*), matching all and only the URLs to which the URL replacer should apply. The URL path can be up to 256 characters long.

The pattern does not require a backslash (/). However, it must at least match URLs that begin with a backslash as they appear in the HTTP header, such as /index.html. Do not include the domain name, such as www.example.com.
No default.

new-url "<new-url_str>"

Enter either a literal URL, such as /index.html, or a regular expression with a back-reference (such as $1) defining how the URL will be interpreted. The new URL cab be up to 256 characters long. No default.

param "<param_str>"

Enter either the parameter’s literal value, such as user1, or a back-reference (such as $0) defining how the value will be interpreted. No default.

new-param "<new-param_str>"

Type either the parameter’s literal name, such as username, or a backreference (such as $2) defining how the parameter’s name will be interpreted in the auto-learning report. You can use up to 256 characters. No default.

url-replacer-policy_name

Specify a unique name that can be referenced by other parts of the configuration.
The name can be up to 63 characters long with no space or special character.
No default.

rule-id "<rule_id>"

Select the sequence number of the URL Replacer Rules No default.

type URL_Replacer

Select the type URL_Replacer. No default.

plugin-name "<plugin-name_str>"

Enter the plugin name. No default.

Related Topic

waf machine-learning url-replacer-rule/policy

waf machine-learning url-replacer-rule/policy

Use this command to enable the machine learning feature and configure its settings.

Syntax

config waf machine-learning url-replacer-rule

edit url-replacer-rule_name

set type {pre-defined | custom-defined}

set app-type {jsp | owa-2003}

set url-replacer-policy_name

set url "<url_str>"

set new-url "<new-url_str>"

set param "<param_str>"

set new-param "<new-param_str>"

next

end

config waf machine-learning url-replacer-policy

edit url-replacer-policy_name

config rule list

edit rule-id "<rule_id>"

set type URL_Replacer

set plugin-name "<plugin-name_str>"

next

end

next

end

Variable Description Default

url-replacer-rule_name

Specify a unique name that can be referenced by other parts of the configuration.
The name can be up to 63 characters long with no space or special character.

No default.

type {pre-defined | custom-defined}

Select either of the following:
  • Predefined—Use one of the predefined URL replacers which can be selected from the Application Type below.

  • Custom-Defined—Define your own URL replacer by configuring the URL Path, New URL, Param Change, and New Param fields below.

No default.

app-type {jsp | owa-2003}

If you have selected Predefined in the Type field above, then you must click the down arrow and select either of the following from the list menu:
  • JSP—Use the URL replacer designed for Java server pages (JSP) web applications, where parameters are often separated by semi-colon (;).

  • OWA 2003— Use the URL replacer designed for default URLs in Microsoft Outlook Web App (OWA), where user name and directory parameters are often embedded within the URL, as illustrated below:

    (^/public/)(.*)
    (^/exchange/)([^/]+)/*(([^/]+)/(.*))*
    These two application types are predefined URL interpreter plug-ins used by popular web applications.
No default.

url "<url_str>"

Enter a regular expression, such as (^/[^/]+)/(.*), matching all and only the URLs to which the URL replacer should apply. The URL path can be up to 256 characters long.

The pattern does not require a backslash (/). However, it must at least match URLs that begin with a backslash as they appear in the HTTP header, such as /index.html. Do not include the domain name, such as www.example.com.
No default.

new-url "<new-url_str>"

Enter either a literal URL, such as /index.html, or a regular expression with a back-reference (such as $1) defining how the URL will be interpreted. The new URL cab be up to 256 characters long. No default.

param "<param_str>"

Enter either the parameter’s literal value, such as user1, or a back-reference (such as $0) defining how the value will be interpreted. No default.

new-param "<new-param_str>"

Type either the parameter’s literal name, such as username, or a backreference (such as $2) defining how the parameter’s name will be interpreted in the auto-learning report. You can use up to 256 characters. No default.

url-replacer-policy_name

Specify a unique name that can be referenced by other parts of the configuration.
The name can be up to 63 characters long with no space or special character.
No default.

rule-id "<rule_id>"

Select the sequence number of the URL Replacer Rules No default.

type URL_Replacer

Select the type URL_Replacer. No default.

plugin-name "<plugin-name_str>"

Enter the plugin name. No default.

Related Topic