Forum Discussion
Peak_10_71174
Nimbostratus
Oct 27, 2009http redirect if no path match irule
I need to create an irule that accomplishes 2 things:
When incoming http requests for data.abc.com are received on a virtual server, they are redirected to www.abc.com/data. However, wh...
JRahm
Admin
Oct 29, 2009So, IF host = data.abc.com AND uri = /, redirect to www.abc.com/data?
If so, try this:
when HTTP_REQUEST {
if { [string tolower [HTTP::host]] eq "data.abc.com" && [HTTP::uri] eq "/" } {
HTTP::redirect "http://www.[domain [HTTP::host] 2]/[getfield [HTTP::host] "." 1]"
}
}
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
