Forum Discussion
smiley_dba_1116
Sep 18, 2012Nimbostratus
3 websites, 1 VIP, 1 iRule for 1 website
Need help writing an iRule to look at the URL request and to redirect if 1 of the URI's is seen. Example:
abc.com
def.com
ghi.com -> redirect to sorry.ghi.com
Want to make sure that abc and def.com continue to pass traffic, but only ghi.com gets redirected to sorry.ghi.com. Thoughts. Thanks.
RGW
- Mohamed_LrhaziAltocumulusUse an HTTP class, not irules, and simply look for "Host header" equals ghi.com or maybe also www.ghi.com, and select "redirect" in the "action" part.
- Kevin_StewartEmployeeHTTP classes are great, but should you want to use an iRule:
when HTTP_REQUEST { if { [string tolower [HTTP::host]] equals "ghi.com" } { HTTP::redirect "http://sorry.ghi.com" } }
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