Forum Discussion
Nicola_DT
Nimbostratus
Aug 20, 2009irule for rewriting an uri in an http request
Hi everyone,
I am writing a simple irule so that if an http request will arrive on the virtual with an uri that starts with "/config" the request will be passed to the pool rewrited and the url...
The_Bhattman
Nimbostratus
Aug 20, 2009I think the first irule event was more correct, but needs a monitor tweak.
when HTTP_REQUEST {
if {[HTTP::uri] starts_with "/config"} {
HTTP::uri /main
}
}
You don't need the response unless you want to change the response towards the client.
Another way is a redirect
when HTTP_REQUEST {
if {[HTTP::uri] starts_with "/config"} {
HTTP::redirect http://[HTTP::host]/main
}
}
Hope this helps
CB
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
