Forum Discussion
pedinopa_170325
Nimbostratus
Sep 22, 2016irule redirection
I am trying to get the irule to redirect to a different default page. I have turned on logging and it appears that for some reason even though my client IP matches the condition in my if statement. ...
VernonWells
Employee
Sep 24, 2016The issue is that you are using Route Domains. Notice that the client IP address is not 10.50.192.220 but rather 10.50.192.220%1 (meaning it's in route domain 1). Try this:
when HTTP_REQUEST {
if { [class match [getfield [IP::client_addr] % 1] equals Client-Redirect-DG] and [HTTP::path] equals "/index.htm" } {
HTTP::redirect "http://[getfield [HTTP::host] ":" 1]/index_new.htm"
}
}
or alter the match class membership to include the % part.
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