Forum Discussion
fcocquyt_104704
Nimbostratus
Jul 11, 2013Redirect HTTPS URL
Hello,
Is is possible to redirect an HTTP URL to another HTTPS url on F5 ?
Example, https://www.test1.com gets redirected to https://www.test2.com
As far I see, this is only possible for regular http traffic ?
Thanks,
Frederik
5 Replies
- nitass
Employee
Example, https://www.test1.com gets redirected to https://www.test2.comdoesn't HTTP::redirect work?
e.g.
HTTP::redirect "https://www.test2.com" - fcocquyt_104704
Nimbostratus
Hi,
The redirect would be for an HTTPS URL to another HTTPS url (typo in my first description)
It is not possible to apply an irule for a virtual server listening on port 443 as the F5 complains that it needs an HTTP profile when applying the iRule containing HTTP::redirect "https://www.test2.com.
Thanks,
Frederik - nitass
Employee
e.g.[root@ve10:Active] config b virtual bar443 list virtual bar443 { destination 172.28.19.252:443 ip protocol 6 rules myrule profiles { clientssl { clientside } http {} tcp {} } } [root@ve10:Active] config b rule myrule list rule myrule { when HTTP_REQUEST { if { [HTTP::host] eq "www.test1.com" and [HTTP::uri] eq "/" } { HTTP::redirect "https://www.test2.com" } } } [root@ve10:Active] config curl -Ik https://www.test1.com HTTP/1.0 302 Found Location: https://www.test2.com Server: BigIP Connection: Keep-Alive Content-Length: 0 - Kevin_Stewart
Employee
Nitass is showing you that in order to process HTTP (OSI layer 7) application traffic, you must be able to see it. You cannot see the traffic if you cannot decrypt it, so a client SSL profile applied to the VIP will allow you to terminate the SSL and see and react to the payload. - fcocquyt_104704
Nimbostratus
Thanks nitass !
Is seems I needed to apply the
profiles {
clientssl {
clientside
}
http {}
part to make this work.
Have a nice day !
Frederik.
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