Forum Discussion
Joe_Pipitone
Nimbostratus
Jun 15, 2009Add additional hostnames to this rule
I have put the following iRule in place, however I need to search for other subdomains in the hostname besides portals, such as www and strip them out and keep the rest of the URI. How easy is this given the following iRule?
when HTTP_REQUEST {
switch [string tolower [HTTP::host]] {
"portals.sitename.com" {
set host "sitename.com"
set uri [string map -nocase {"/path_to_replace" "/new_path" "index.jsp" "index.asp"} [HTTP::uri]]
HTTP::redirect http://$host$uri
}
}
}
I simply want to add another statement, do I just add a case statement under the switch and add additional subdomains?
Thanks for any help!
- Joe_Pipitone
Nimbostratus
Fixed - I just added another statement .... no case needed...
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