Forum Discussion
KJ_50941
Nimbostratus
Sep 28, 2012iRule hlep
I need to redirect from http to https , also since some users have bookmark specific port for exmaple port 8050 in their browser to be redirect to https. how do I do that.
does this works?
when HTTP_REQUEST {
if { ([HTTP::uri] eq "/")}{
HTTP::redirect ""
}
}
when HTTP_REQUEST_SEND {
clientside {
if { ( ($example_host eq "example.com") } {
HTTP::header replace Host "example.com:8050"
}
}
}
Thx
14 Replies
- nitass
Employee
do I need to change 80 to all port or create new VIP with all portyou can change this virtual server port 80 to any port.
can this iRule work for redirect on *_VS ? i think you should use the one nathan suggested. - KJ_50941
Nimbostratus
Thx, and this :when HTTP_REQUEST {
HTTP::redirect https://[getfield [HTTP::host] ":" 1][HTTP::uri]
}
will be applied to all port VIP?
Thx again - nitass
Employee
will be applied to all port VIP? yes. please be noted that non-http traffic will be dropped. - KJ_50941
Nimbostratus
Thx, for your time.
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
