Forum Discussion
Marco_Bayarena_
Altostratus
Jul 03, 2012Rewrite with exceptions
I have a redirect irule that I want to apply expect when it is coming from a specific client IP address(es). I am having issues when some servers try to POST data to VIP with the following iRule applied. I figure it would be easier to just make an exception to the rule.
when HTTP_REQUEST {
if { [TCP::local_port clientside] = 80 } {
switch [HTTP::host[ {
"www.site1.com" { HTTP::redirect "http://www.site2.com" }
"www.site1a.com" { HTTP::redirect "http://www.site2.com" }
}
}
}
Any suggestions?
- nitass
Employee
you do not want to trigger HTTP::redirect if it s POST request, do you? if yes, may we check HTTP::method?
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