Forum Discussion
Joe_Pipitone
Nimbostratus
Apr 07, 2014Various rewrites/redirects on one VIP
I am currently burning up 3 VIPs to get all these redirects and rewrites working, however I'd like to efficiently combine the iRule, and point all 3 domains to the same VIP and accomplish the same th...
giltjr
Nimbostratus
Apr 07, 2014I can see why you are getting loops. Take your first if:
if { [HTTP::query] contains "TID=" } { HTTP::redirect "http://newforum.newdomain.com/default.aspx?g=posts&t=[URI::query [HTTP::uri] TID]" return }
Since you are not checking for a host name it will match both "oldforum.olddomain.com" and "newforum.newdomain.com"
I would do something like this to start with:
if {[HOST::name] ends_with "newdomain.com"} {
Stuff do do when domain is "newdomain.com"
}
elseif {[HOST::name] ends_with "olddomain.com"} {
Stuff to do when domain is "olddomain.com"
} else {
stuff do do in case host name ends with something we did not expect.
}
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