Forum Discussion
TC__Wolsey_1123
Nimbostratus
Jul 11, 2005Compound expression argument to redirect?
I am having a problem passing a compound expression to 'redirect to' ie:
if (http_uri starts_with "/this") {
redirect to "http://server.name/that + getfield(http_uri, '?', 2)"
}
The rule is accepted but the redirect is returned as the literal string 'http://server.name/that + getfield(http_uri, '?', 2)'.
Is there a way to force the evaluation of the getfield() and concat operator before the expression is handed to the redirect? I have tried various syntax surrounding the expression (I tried parentheses, curlies and nested double quotes). All these return the literal or come up with a parse error.
- Martin_MachacekHistoric F5 AccountThe corect syntax is:
if (http_uri starts_with "/this") { redirect to "http://server.name/that" + getfield(http_uri, '?', 2) }
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects