Forum Discussion
Bhajan_Gupta_28
Nimbostratus
Sep 15, 2017Required help for iRule for source based redirection
Hi guys,
Can any one help me to write an IRule for below requirement as i am using Big-IP 12.1.2 version..
having URL for example http://testing.dff.com and further have two sub folder suc...
Maneesh_72711
Cirrostratus
Sep 15, 2017yes it is very much possible and you already have thought on the correct lines.
when CLIENT_ACCEPTED {
if { ([class match [IP::client_addr] equals Internal] )}
{
HTTP::respond 301 Location "http://testing.dff.com/tnr";
}
else
{
HTTP::respond 301 Location "http://testing.dff.com/pnr";
}
}
Where you internal would be your internal subnets/IP's they land on /tnr and external world land on /pnr.
Stanislas_Piro2
Cumulonimbus
Sep 15, 2017This irule won't work!!
- HTTP commands are not allowed in CLIENT_ACCEPTED event
- the goal was to allow or deny both URLs based on client ip
- even if the question was to filter uri based on client ip to redirect to on of URLs, this irule will loop because there is no URI condition!
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
