Forum Discussion
Irule to redirect the traffic to UAt app on PROD server
Hi All,
I required your experitse help in creating Irule :
scenerio:
We have production server on which both PROD url www.abc.com & UAT url uat.abc.com are hosted.
On F5, we have One VIP (with two pool members). This VIP is natted with Public IP on Firewall.They have created alias DNS record for uat.abc.com which resolves to same Public ip as PROD url www.abc.com.
Hence both come with same public IP and hits the VIP on F5. I wanted to create a IRule where when user tried to connect to uat.abc.com, the request need to be sent to UAT site on webserver. Your help is highly appreciable.
Thanking you in advance.
Regards, Rajneesh
3 Replies
- Kevin_Stewart
Employee
Pretty straight forward to do in an iRule:
when HTTP_REQUEST { switch [string tolower [HTTP::host]] { "www.abc.com" { pool abc_pool } "uat.abc.com" { pool uat_pool } default { pool abc_pool } } }You can also do this without iRules with an LTM policy configuration. In either case you'll also want a OneConnect profile applied to the VIP: specific OneConnect profile + OneConnect enabled in the HTTP profile.
- t_rajneesh_2252
Nimbostratus
Thanks Kevin for your quick help..I will get this Irule tested tommorow and will let you know the result.
Regards, Rajneesh
- t_rajneesh_2252
Nimbostratus
Hi Kevin,
The above irule didnt worked as expected and inturn took down working PROD url www.abc.com too.
What was done : I have created a new pool uat_pool and mapped exisiting pool_members of abc_pool to new pool uat_pool: Created Irule as you mentioned above & applied it to VS of abc_pool. After this , we were not able to access both uat.abc.com and www.abc.com.
Please let me know if anything need to be corrected or other way to get this requirement done.
Regards, Rajneesh
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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