String maps
MAP_STRING(<string_map_name>) and IS_STRINGMAP_KEY(<string_map_name>).
How String Maps Work
| Key | Value |
|---|---|
| /url_1.html | http://www.redirect_url_1.com/url_1.html |
| /url_2.html | http://www.redirect_url_2.com/url_2.html |
| /url_3.html | http://www.redirect_url_1.com/url_1.html |
Configuring a String Map
-
Create a string map.
add policy stringmap <name> -comment <string>
-
Bind a key-value pair to the string map.
bind policy stringmap <name> <key> <value> [-comment <string>]
bind policy stringmap url_string_map1 "/url_1.html" "http://www.redirect_url_1.com/url_1.html"
To configure a string map by using the NetScaler GUI
Example: responder policy with a redirect action
add stringmap url_string_map
bind stringmap url_string_map /url_1.html http://www.redirect_url_1.com/url_1.html
bind stringmap url_string_map /url_2.html http://www.redirect_url_2.com/url_2.html
bind stringmap url_string_map /url_3.html http://www.redirect_url_1.com/url_1.html
add responder policy pol_url_redirects TRUE act_url_redirects
bind cs vserver csw_redirect -policyname pol_url_redirects -priority 1 -type request
To configure a string map by using the NetScaler GUI
-
On the navigation pane, expand AppExpert and click String Maps.
-
On the details pane, click Add.
-
In the Create String Map page, set the following parameters:
-
Name. Name of the string map.
-
Configure key value. ASCII based key value entry bound to the string map
-
Comments. A short description about the key values bound to the string map.
-
-
Click Create and Close.
