27-Jul-2021 04:18
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 "/citapreviarrcc") }
{
node "xxxxxxxxxxx:8080/citaprevia"
}
But F5 tells me that it is not possible.
Is there a way to do it.
Thanks.
27-Jul-2021
07:11
- last edited on
04-Jun-2023
19:22
by
JimmyPackets
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
}
}