Forum Discussion
amul_191720
Nimbostratus
Mar 11, 2015HTTPS to HTTP redirection is not happening with irule
Hi ,
Could you please help here in this redirection irule. I tried all the way but i am not able to redirect this https traffic.
when HTTP_REQUEST {
if { [HTTP::uri] starts_with "/xyz...
StephanManthey
Nacreous
Mar 11, 2015Hi Amul, you want to test for the host-header to get it working:
when HTTP_REQUEST {
if {[string tolower [HTTP::host]] equals "xyz.com"} {
HTTP::redirect "http://zyx.com"
} elseif {[string tolower [HTTP::host]] equals "www.xyz.com"} {
HTTP::redirect "http://zyx.com"
}
}
Second iRule:
when HTTP_REQUEST {
if {[string tolower [HTTP::host]] equals "xyz.com"} {
HTTP::redirect http://zyx.com/
}
}
Thanks, Stephan
Edited: Add 2nd iRule upon specificationHelp 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