Forum Discussion
Frank_30524
Nimbostratus
Apr 16, 2009convert irule from 9.x to 4.x
I am relatively new to 4.x and need help converting a redirect irule.
Here is it in version 9.x.
when HTTP_REQUEST {
if { [HTTP::uri] eq "/" and [HTTP::host] eq "www...
The_Bhattman
Nimbostratus
Apr 19, 2009You can rewrite it in the following ways:
when HTTP_REQUEST {
if { ([HTTP::uri] eq "/") and ([HTTP::host] eq "www.abc.abc.com") } {
HTTP::redirect "http://www.abc.abc.com:8000/bla/bla"
} else {
HTTP::redirect "https://[HTTP::host][HTTP::uri]"
pool abc-pool
}
}
or
when HTTP_REQUEST {
if { ([HTTP::uri] eq "/") and ([string tolower [HTTP::host]] eq "www.abc.abc.com") } {
HTTP::redirect "http://www.abc.abc.com:8000/bla/bla"
} else {
HTTP::redirect "https://[HTTP::host][HTTP::uri]"
pool abc-pool
}
}
or
when HTTP_REQUEST {
if { ([HTTP::host] eq "www.abc.abc.com") and ([HTTP::uri] eq "/") } {
HTTP::redirect "http://www.abc.abc.com:8000/bla/bla"
} else {
HTTP::redirect "https://[HTTP::host][HTTP::uri]"
pool abc-pool
}
}
Hope this helps
CB
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