Forum Discussion
kraigk_52257
Nimbostratus
Jul 01, 2015Inefficient iRule, works but not perfect
We have a working iRule that I'm sure can be improved/. The first section is simple redirects from domain.org URL to equivalent https domain.com URL. We discovered that if users browsed directly to...
kraigk_52257
Nimbostratus
Jul 06, 2015Nathan, I tested and implemented exactly what you suggested and it works perfectly. I really appreciate your help.
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::host]] {
"team*" { HTTP::respond 301 Location "https://team.domain.com[HTTP::uri]" }
"site1*" { HTTP::respond 301 Location "https://site1.domain.com[HTTP::uri]" }
"site2*" { HTTP::respond 301 Location "https://site2.domain.com[HTTP::uri]" }
"myteam*" { HTTP::respond 301 Location "https://myteam.domain.com[HTTP::uri]" }
"*.domain.com" { HTTP::respond 301 Location "https://[HTTP::host]/default.aspx" }
}
}
- natheJul 06, 2015
Cirrocumulus
Great to hear!
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