iRule for single VIP but with multiple pool

1042

 

Here I want to redirect our two websites visitors (en.microsoft.com and ph.microsoft.com) to same public IP but to two different pool.

If someone types en.microsoft.com, LTM needs to redirect to a specific path /en and specific pool name en_pool

If someone types ph.microsoft.com, LTM needs to redirect to a specific path /ph and specific pool name ph_pool

iRules APIDescriptionExample
HTTP::uriReturns the URI of the HTTP request. This typically does not include the protocol or hostname, just the path and query string, starting with a slash.example 1: http://itadminguide.com/wp-admin/admin.php?page=tablepress&action=edit&table_id=9

HTTP::uri returns
/wp-admin/admin.php?page=tablepress&action=edit&table_id=9
HTTP::pathReturns Path part of the HTTP request.example 1: http://itadminguide.com/

HTTP:path returns
/

example 2: http://itadminguide.com/wp-admin/admin.php?page=tablepress&action=edit&table_id=9

HTTP:path returns
/wp-admin/admin.php
HTTP::hostReturns host header of the HTTP request along with port but when non-standard port is specified (expect 80 (HTTP) or 443(HTTPS)) example 1: http://www.itadminguide.com/

HTTP::host returns
www.itadminguide.com

example 2: http://itadminguide:7003

HTTP::host returns
itadminguide:7003


Related Articles & Comments

Thank you for visiting us. To continue receiving updates, please Subscribe to our Social Media Channels.

Google+
FACEBOOK
RSS
YOUTUBE
Menu Title
%d bloggers like this: