Forum Discussion
Richard__Harlan
Mar 22, 2005Historic F5 Account
HTTP Redirect Question
We just installed our new 6400 with ver 9.0.4 when writeing our rules we user to doc LTM guide for GTM and it show doing HTTP redirects like so
when HTTP_REQUEST {
if { [[HTTP::uri] matches_regex "secure"] } {
[HTTP::redirect "https://[HTTP::host][HTTP::uri]"]
}
}
The syntax checker liked the rule just fine, now when someone hit the rule we get an error. On the Forums I see the HTTP redirect writen like
redirect to "https://[HTTP::host][HTTP::uri]"
My question is which am I to use and if the above does not work can it be changes in the docs. THanks
Richard Harlan
John Deere
- drteeth_127330Historic F5 AccountListen to the forum. There is an extra set of square brackets in the above rule.
- Richard__HarlanHistoric F5 AccountI though ss just wanted to make sure. Thanks
- unRuleY_95363Historic F5 AccountAlso, you can use either "HTTP::redirect xxx" or "redirect to xxx". The newer syntax is "HTTP::redirect", but to make it easier to migrate from 4.x, we maintained some of the common 4.x commands like "redirect to".
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