Forum Discussion
babaransari_361
Nimbostratus
Jun 01, 2018https redirection using single virtual server
need to configure an irule to perform https redirection using a single virtual server. The url http://abc.com:8080 needs to be redirected to https://abc.com:8080 but i need to achieve this redirectio...
youssef1
Cumulonimbus
Jun 01, 2018Hi,
You trigge your irule to "HTTP_REQUEST" it's too late try this:
when RULE_INIT {
set redirect 0
if { [URI::protocol [HTTP::uri]] eq "https" } {
set redirect 0
event disable all
} else {
set redirect 1
}
}
when HTTP_REQUEST {
if { $redirect } {
HTTP::redirect https://[getfield [HTTP::host] ":" 1]:8080[HTTP::uri]
event disable all
}
}
Keep me in touch
regards
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