Forum Discussion
tacobell_112236
Nimbostratus
Feb 21, 2011Redirect Based on IP
Hello all- Im a newbie- can someone assist .
I need to create an Irule wheras specefic URL's can only be accessed based on IP address(s) and if not on the IP range I need to redirect to ano...
hoolio
Cirrostratus
Feb 22, 2011One small suggestion:
I didn't think matchclass or class accept the ne operator. If they don't, you can negate the command status using not or !:
when HTTP_REQUEST {
if { [matchclass [string tolower [HTTP::uri]] eq uri_datagroup] and not ([matchclass [IP::client_addr] eq address_datagroup]) } {
HTTP::redirect "http://www.example.com"
}
}
Aaron
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