Forum Discussion
SysAdmins_23367
Nimbostratus
Apr 09, 2010can't get HTTP::redirect to work
I'm attempting to make a simple iRule which will redirect a user with a defined IP address and allow everyone else who connects to the default pool. The problem is that everytime I associate the foll...
hoolio
Cirrostratus
Apr 09, 2010If you check the /var/log/ltm log file, you should see runtime TCL errors indicating an invalid command of 1 or 0. If you add the IP::addr command it should work fine:
when HTTP_REQUEST {
if { [IP::addr [IP::client_addr] equals 192.168.98.232]}{
HTTP::redirect "http://192.168.30.53/index.html"
}
}
Note that the forward command will cause LTM to forward the request without load balancing to the VIP's default pool. The destination address won't be translated. So you can remove the else clause and then LTM will use the VIP's default pool for any non-matching IP.
Aaron
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