Forum Discussion
Tom_White_69772
Nimbostratus
Mar 16, 2007Redirect Irule on V4.5.10
We have created a VIP for URL "itrequest.mycompany.usa.com" but want the users to only have to enter "itrequest.mycompany.com" or "request.mycompany.com". Being first-time irule novices, what's th...
Martin_Machacek
Mar 16, 2007Historic F5 Account
You need to keep in mind that the difference in your URLs is in the hostname component not the path. There are 2 possible solutions:
1) (assuming the all 3 hostnames resolve to unique addresses) create 3 VIPs and make VIPs servicing addresses to which
request.mycompany.com and itrequest.mycompany.com resolve redirect to itrequest.mycompany.usa.com, with following
rule:
rule redirect_to_main_url {
redirect to "http://itrequest.mycompany.usa.com" + http_uri
}2) Make request.mycompany.com and itrequest.mycompany.com aliases (CNAME) for
itrequest.mycompany.usa.com in your DNS configuration and
a) either configure your backend servers to ignore the Host: header in requests (i.e. no virtual hosting)
b) using following rule on your itrequest.mycompany.usa.com VIP:
rule redirect_to_main {
if(http_host != itrequest.mycompany.usa.com) {
redirect to "http://itrequest.mycompany.usa.com" + http_uri
} else {
use pool
}
}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