Forum Discussion
DM_5174
May 09, 2011Nimbostratus
HTTP to HTTPS conditional redirect help
hi all,
Please help with integrating the first code and second code int an effcient script that achieve both redirecting if the
users comes in connecting to www.test.com so it goes to a...
Michael_Yates
May 09, 2011Nimbostratus
Hi DM,
I believe that this will do what you are needing.
when HTTP_REQUEST {
if { [string tolower [HTTP::host]] eq "www.test.com" } {
HTTP::redirect "https://www.test.123.com/[HTTP::uri]"
return
}
else {
HTTP::redirect "https://[getfield [HTTP::host] ":" 1][HTTP::uri]"
}
}
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