Forum Discussion
Robert_Crandall
Nimbostratus
Mar 31, 2008Detecting https in HTTP_REQUEST
I want to do a redirect of a home page, for example:
www.abc.com to www1.abc.com.
Looking at previous forums it was suggested that something like the following will work: ...
Nicolas_Menant
Employee
Mar 31, 2008Hi,
when CLIENT_ACCEPTED {
if { [TCP::local_port] equals "80" } {
SSL::disable
}
when HTTP_REQUEST {
if {[HTTP::host] equals "www.abc.com"} {
if { [TCP::local_port] equals "80" } {
HTTP::redirect "http://www1.abc.com" }
} elseif { [TCP::local_port] equals "443" }
HTTP::redirect "https://www1.abc.com"
}
}
}
This code would work if the BIGIP is the SSL termination of the BIGIP Otherwise you would not be able to check the data inside the flow.
If this is the case then you won't be able to send HTTP flow or you'll need to disable the SSL flow. you can do so with the SSL::disable command
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