FortiGate
FortiGate Next Generation Firewall utilizes purpose-built security processors and threat intelligence security services from FortiGuard labs to deliver top-rated protection and high performance, including encrypted traffic.
jasri
Staff
Staff

Description
This article describes how to insert the special symbol "?" in the CLI as part of the input.  In the FortiOS CLI, "?" is usually used to open the help menu, but under certain circumstances it can be used as part of the input, for example, to configure a redirect URL containing a "?" in a firewall policy.

Solution
To use the special symbol "?" as part of the input in the CLI, press "CTRL+V" on the keyboard first, then press "?".

This is how to configure a redirect firewall policy to use a url with a "?" :

config firewall policy
    edit 1   
        set name "test"
        set uuid 9454cdf2-4923-51e8-336f-123d6b6ab6b5
        set srcintf "port2"
        set dstintf "port1"
        set srcaddr "all"
        set dstaddr "all"
        set action accept
        set schedule "always"
        set service "ALL"
        set logtraffic all
        set groups "Local"
        set nat enable
        set redirect-url "http://abc.com/test?=123"
    next
end

Note that copying and pasting the entire redirect-url won't work, it is absolutely necessary to input "CTRL+V" first before using the "?" symbol.

Contributors