Forum Discussion
Pete_Paiva_7147
Nimbostratus
Aug 28, 2007https to http redirect
I'm looking to create an iRule that will take https://my.mycompany.com and redirect it to http://my.mycompany.com.
So in other words, if someone were to put in https:// it would redirect the...
Wil_Schultz_101
Nimbostratus
Sep 04, 2007I have a similar setup in one of my rules, this is a permanent redirect (301):
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::host]] {
"my.mycompany.com" {
HTTP::respond 301 \
"Location" "http://my.mycompany.com[HTTP::uri]" \
return 0
}
}
} Or if you're looking for a temp redirect (302):
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::host]] {
"my.mycompany.com" {
HTTP::redirect "http://my.mycompany.com[HTTP::uri]"
return 0
}
}
} 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