Fortinet black logo

CLI Reference

system replacemsg

system replacemsg

Use this command to customize the following FortiWeb HTML pages:

  • Pages that FortiWeb presents to clients when it authenticates users. FortiWeb uses these pages when you configure a site publishing configuration to use HTML form authentication for its client authentication method. For details, see waf site-publish-helper rule.

  • The error page FortiWeb uses to respond to an HTTP request that violates a policy that responds to violations with the action alert and deny or period block.

  • The “Server Unavailable!” page that FortiWeb returns to the client when none of the server pool members are available either because they are disabled or in maintenance more, or they have failed the configured health check.

When you specify the HTML code for the web pages using the buffer setting, you enter the complete HTML code with changes, even if you are only changing a word or fixing a typographical error. The web UI provides a more convenient editing method that allows you to see the effect of your changes as you edit.

FortiWeb uses these pages for all server policies. If you require a page content that is customized for a specific policy, create an ADOM that contains the custom pages for that policy.

To use this command, your administrator account’s access control profile must have either w or rw permission to the sysgrp area. For details, see Permissions.

Syntax

config system replacemsg

edit {url-block | server-inaccessible | login | token | rsa-login | rsa-challenge | pre-login-disclaimer}

set buffer "<buffer_str>"

set code <code_int>

set set format {html | none | text}

set set group {alert | site-publish}

set set header {8 bit | HTTP | no header type}

end

Variable Description Default

{url-block | server-inaccessible | login | token | rsa-login | rsa-challenge | pre-login-disclaimer}

Enter one of the following options to specify the page to modify:

  • url-block—Attack block page
  • server-inaccessible—Server unavailable message
  • login—Authentication login page
  • token—Token authentication page
  • rsa-login—RSA SecurID authentication page
  • rsa-challenge—RSA SecurID challenge page
  • pre-login-disclaimer—A login disclaimer message for administrators logging in to FortiWeb
No default

buffer "<buffer_str>"

Enter the HTML content for the page.

Because the code for an web page is usually more than one word and contains special characters, surround it with double quotes ( " ).

Preset HTML content

code <code_int>

If you are editing the url-block item, specify the HTTP page return code as an integer.

You cannot edit this setting for other HTML pages.

500

set format {html | none | text}

Specifies the format of the replacement message. Currently, all messages are HTML.

Cannot be changed from the default.

html

set group {alert | site-publish}

Specifies whether the replacement page is used for security features (blocking and server unavailable) or site publishing feature.

Cannot be changed from the default.

alert (url-block, server-inaccessible)

site-publish (login, token, rsa-login, rsa-challenge)

set header {8 bit | HTTP | no header type}

Specifies the header type for the message.

Cannot be changed from the default.

HTTP

Related topics

system replacemsg

Use this command to customize the following FortiWeb HTML pages:

  • Pages that FortiWeb presents to clients when it authenticates users. FortiWeb uses these pages when you configure a site publishing configuration to use HTML form authentication for its client authentication method. For details, see waf site-publish-helper rule.

  • The error page FortiWeb uses to respond to an HTTP request that violates a policy that responds to violations with the action alert and deny or period block.

  • The “Server Unavailable!” page that FortiWeb returns to the client when none of the server pool members are available either because they are disabled or in maintenance more, or they have failed the configured health check.

When you specify the HTML code for the web pages using the buffer setting, you enter the complete HTML code with changes, even if you are only changing a word or fixing a typographical error. The web UI provides a more convenient editing method that allows you to see the effect of your changes as you edit.

FortiWeb uses these pages for all server policies. If you require a page content that is customized for a specific policy, create an ADOM that contains the custom pages for that policy.

To use this command, your administrator account’s access control profile must have either w or rw permission to the sysgrp area. For details, see Permissions.

Syntax

config system replacemsg

edit {url-block | server-inaccessible | login | token | rsa-login | rsa-challenge | pre-login-disclaimer}

set buffer "<buffer_str>"

set code <code_int>

set set format {html | none | text}

set set group {alert | site-publish}

set set header {8 bit | HTTP | no header type}

end

Variable Description Default

{url-block | server-inaccessible | login | token | rsa-login | rsa-challenge | pre-login-disclaimer}

Enter one of the following options to specify the page to modify:

  • url-block—Attack block page
  • server-inaccessible—Server unavailable message
  • login—Authentication login page
  • token—Token authentication page
  • rsa-login—RSA SecurID authentication page
  • rsa-challenge—RSA SecurID challenge page
  • pre-login-disclaimer—A login disclaimer message for administrators logging in to FortiWeb
No default

buffer "<buffer_str>"

Enter the HTML content for the page.

Because the code for an web page is usually more than one word and contains special characters, surround it with double quotes ( " ).

Preset HTML content

code <code_int>

If you are editing the url-block item, specify the HTTP page return code as an integer.

You cannot edit this setting for other HTML pages.

500

set format {html | none | text}

Specifies the format of the replacement message. Currently, all messages are HTML.

Cannot be changed from the default.

html

set group {alert | site-publish}

Specifies whether the replacement page is used for security features (blocking and server unavailable) or site publishing feature.

Cannot be changed from the default.

alert (url-block, server-inaccessible)

site-publish (login, token, rsa-login, rsa-challenge)

set header {8 bit | HTTP | no header type}

Specifies the header type for the message.

Cannot be changed from the default.

HTTP

Related topics