Forum Discussion
Javi_Lora
Jul 27, 2021Altostratus
Redirect 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 "/citapreviarrcc") }
{
node "xxxxxxxxxxx:8080/citaprevia"
}
But F5 tells me that it is not possible.
Is there a way to do it.
Thanks.
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 } }
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