Forum Discussion
sundogbrew
Altocumulus
Nov 21, 2008uri redirect
Folks, I am new to irules and not a very good scripter. Was very resistant to use them and now find that I am not going to get around it. So I am looking for some help. This seems like a simple kin...
Nov 21, 2008
This should be fairly straght forward assuming you are terminating SSL on the BIG-IP. If you are not decrypting the SSL, there is no way for the iRules to look at the content.
Here's an iRule that should get you started.
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::uri]] {
"/bla/bla/bla*" {
HTTP::redirect "https://anotherguysdomain.com[HTTP::uri]"
}
}
}
this will redirect all requests that start with /bla/bla/bla to the new domain and allow all others to the default pool. Just make sure this iRule isn't running on the "anotherbuysdomain.com" virtual or you will get yourself into a recursive loop. If that's a requirement, you can check the value of "[HTTP::host]" around the switch.
-Joe
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