Forum Discussion
Sams_88783
Nimbostratus
Aug 26, 2010Help with version 4.x irule
Hello,
I have 2 urls
https://mydomain/baa/init.do
https://mydomain/admin/init.do
And one pool mydomain.
My requirement is from a single soure 10.2.2.4 only allow access to url rest all has to go to or discard.
The Big-IP OS is running 4.5.11
I tried with the following statement
if(client_addr == 10.2.2.4)
{redirect to "" + "/admin" + "/init.do" + http_uri}
else {use pool mydomain}
if(client_addr!= 10.2.2.4)
{redirect to "" + "/baa" + "/init.do" + http_uri}
{use pool mydomain}
else {discard}
}
But its not working.
This is really urgent for me please help.
- Sams_88783
Nimbostratus
Can i have some help on this pls - The logic in the iRule doesn't make sense to me. If client_addr equals "10.2.2.4" redirect, else use pool. Then you do a not test on the client_addr which would be the same case as the previous else. You then have an extra "{use pool mydomain}" before the else.
if (client_addr == 10.2.2.4) { redirect to "https://mydomain/admin/init.do" + http_uri } else { redirect to "https://mydomain/baa/init.do" + http_uri }
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