Forum Discussion
scott_sams_8256
Nimbostratus
Jun 08, 2010irule redirection question
i guess i am looking for an opinion on an idea i have.
we manage a handful of domains and are starting to get more and more redirect requests. i was told by our ecom director that i should ...
Michael_Yates
Nimbostratus
Jun 09, 2010I'm sorry. I'm crossing my realities.
For normal browsing (without the LTM or any iRules) then the case does not matter for what the LTM picks up as [HTTP::host].
When you are processing the [HTTP::host] value through an iRule then the case IS sensitive and needs to be put in a known comparative state, so you should use the "string tolower". I apologize for the mistake and confusion.
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::host]] {
"www.website1.com" { HTTP::respond 301 Location "http://www.google.com" }
"www.website2.com" { HTTP::redirect "http://www.yahoo.com" }
"www.website3.com" { pool website3pool }
}
}
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
