Forum Discussion
ukitsysadmin_95
Nimbostratus
Aug 18, 2009Redirect accourding to source IP ranges
Referring to the previous post: http://devcentral.f5.com/Default.aspx?tabid=53&view=topic&postid=34863
I'm looking to create an iRule whereby visitors to a specific website are redirect...
ukstin
Nimbostratus
Aug 18, 2009I think the best way to do it is with a dataclass, an example of rule could be this:
class class_ips_country1 {
network 150.1.1.1 mask 255.255.255.248
}
when HTTP_REQUEST {
if { ([matchclass [IP::client_addr] equals $::class_ips_country1]) } {
pool pool_country1
} elseif { (matchclass [IP::client_addr] equals $::class_ips_country2]) } {
pool pool_country2
}
}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
