ReplaceVariableInUrl (open)
Rewrite an URL to replace an existing variable
Syntax
LOADLIB "wh::internet/urls.whlib";
STRING FUNCTION ReplaceVariableInUrl(STRING url, STRING overridevar, STRING overridevalue)
Parameters
STRING url
URL to modify
STRING overridevar
Name of the variable to replace
STRING overridevalue
Value to set this variable to
Return value
STRING
The rewritten URL
Description
This function replaces the requested variable to a URL, takes care of proper URL encoding and adding the necessary '?' and '&" characters to the URL. This function will eliminate duplicates if the requested variable occurs more than once. If the requested variable does not exist on the URL, it will be added