Forum Discussion
Javi_Lora
Altostratus
Jul 27, 2021Redirect to a node with context
I'm trying to create a rule that when it comes with a context it redirects me directly to a node with another context. Example: when HTTP_REQUEST { if {([HTTP::uri] starts_with "/citap...
Jul 27, 2021
Hi Javi Lora,
when HTTP_REQUEST {
if { [HTTP::uri] starts_with "/citapreviarrcc" } {
HTTP::uri "/citaprevia"
node 1.2.3.4 8080
}
}If you want to see changed uri in browser:
when HTTP_REQUEST {
if { [HTTP::has_responded] } { return }
if { [HTTP::uri] starts_with "/citapreviarrcc" } {
HTTP::redirect "http(s)://[HTTP::host]/citaprevia"
return
}
elseif { [HTTP::uri] equals "/citaprevia" } {
node 1.2.3.4 8080
}
}Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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