Forum Discussion
Bob_10976
Nimbostratus
Mar 25, 2010Rewrite rule not working, what am I missing?
I have this iRule that works fine, with the exception of the last entry, which I can't seem to get to take. This is assiged to our MOSS farm, so we have several web sites under one pool. I added the...
Bob_10976
Nimbostratus
Mar 25, 2010I forgot to ask, and I'm sure I can do this a couple of ways but since were being so clean I'd like to keep it that way.
The domain7 that I was looking to match both host and uri, I have other uri's on that same host that I have to redirect. Do I create a whole new entry, basically the same thing you gave me before or do I use an elseif in there, or is there a way to stack them like you did with the first entry using a "-"?
Thanks
Bob
when HTTP_REQUEST {
switch "[string tolower [HTTP::host]]" {
"domain1.com" -
"www.domain1.com" {
HTTP::respond 301 Location "http://domain2.com
}
"domain3.com" -
"www.domain3.com" {
HTTP::respond 301 Location "https://domain3-edit.com
}
"www.domain4.com" {
HTTP::respond 301 Location "http://domain4.com/"
}
"domain5.com" {
HTTP::respond 301 Location "https://domain5-edit.com/"
}
"www.domain6.com" {
HTTP::respond 301 Location "http://domain6.com/"
}
"www.domain7.com" {
HTTP::respond 301 Location "http://domain7.com/"
}
"domain7.com" {
if {[string tolower [HTTP::uri]] eq "/security"}{
HTTP::respond 301 Location "http://domain7.com/"ciso/pages/services.aspx
}
}
}
}
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