querystring.clean
Available in all subroutines.
Returns the given URL without empty parameters. The query string is removed if empty (either before or after the removal of empty parameters). Note that a parameter with an empty value does not constitute an empty parameter, so a query string "?something" would not be cleaned.
Example
set req.url = querystring.clean(req.url);