pelle_71294
Jul 08, 2010Nimbostratus
iRule Redirection Problem
Hi,
Got a few iRule problems. My main problem is that I usually don't configure our F5 BigIPs very often and the guy doing it is not available.
The problem is that I thought I had created a maintenance iRule based on some simple requirements that will redirect requests based on source-ip and url. However when I now got a chance to test it, it won't work as I expected.
Would very much appriciate any pointers to what I have done wrong with this.
when HTTP_REQUEST {
if { ! [matchclass [IP::client_addr] equals $::acl_mycompany_nets]
|| ! [matchclass [URI::decode [string tolower [HTTP::uri]]] contains $::acl_maintenance]} {
HTTP::redirect http://www.mycompany.com/maintenance/index.php
}
}
It's using the two data lists.
acl_mycompany_nets contains 2 networks for the sake of example. 10.10.0.0/22 and 172.16.0.0/23.
acl_maintenance contains /callback/ /maintenance/ and /pictures/
It redirects as it should to /maintanence/index.php
But when I click a link on that go to /maintenance/pictures//index.php it just goes back to /maintenance/index.php, same thing for /callback//index.php
Both returns to /maintenance/index.php