Forum Discussion
http to https redirect
Hi, I new in irule and i want every time that client do this "http://myserver.com" the F5 will redirect to "https://myserver.com". I chenged my virtual server and now he is listening to http and in the policy i put the default i rule _sys_https_redirect . But its not working.
can some explain how to use this irule ? I don't know if it impotent but i use all sow SSL Profile (Client) (i have certificate to the server)
Regards Rafi
7 Replies
- Os_69448
Nimbostratus
Hello Rafi,
Can you please clarify if your new virtual server is http or https. SSL profile on the virtual server suggest that you have https. As far as I understand, SSL Profile on http would not work (unless you type https://VS.IP:80 ).
Os
- Rafish_129330
Nimbostratus
Hi,
At first i configured my virtual server as HTTPS and with certificate. When try to go to web page withe https it works. But now i want to allow my client to write http://servername.com and the F5 will redirect the http to https.
i still need the ssl certificate in the server.
Regards Rafi
- Os_69448
Nimbostratus
Hello Rafi,
You need two virtual servers.
VS-servername.com:HTTP ---Apply iRule _sys_https_redirect. VS-servername.com:HTTPS ---Apply ssl profile here.
You'll get a redirect to https if you access http://servername.com Also, you'll be able to access https://servername.com
Os
- Rasool1224
Nimbostratus
Hi there, I do face same problem, as per above answer, What I understood is, 1. create one VS_with_http_port. 2. create another VS_with_https_port and adding same nodes. but in 1 you advised to apply iRule_sys_https_redirect, my question is what should I write in the below field in the iRule HTTP::redirect https://[getfield [HTTP::host] ":" 1][HTTP::uri] finally which VS should I apply ASM policy. kindly update thank you & prompt response is much appreciated. Regards, Gulam
- Rafish_129330
Nimbostratus
Hi,
I succeed to do the redirect but i still need the certificate because the pool member is member:443.
I configured the first VS as you suggested and the http was redirect to https but the web page didn't open because i must certificate.
Is it possible to do what i want ?
Regards Rafi
- Os_69448
Nimbostratus
Hi,
If the front-end web server is listening on 443 then on VS-servername.com:HTTPS you need to modify the SSL Profile (Server) to serverssl.
Os
- Rafish_129330
Nimbostratus
Hi,
O.K i understand.
T H A N K Y O U V E R Y M U C H .
Regards Rafi
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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