Forum Discussion
Title: Redirecting HTTP to HTTPS for an HTTPS virtual server
Dear All.
Please am new to iRules, but i have read a lot on this topic and i have attempted to solve this issue (as in subject) by using "https://[getfield [HTTP::host] ":" 1][HTTP::uri]" directly in the HTTPClass Profile at the "Redirect to" field.
I have attached this HTTPClass profile to an HTTPS Virtual Server but all HTTP requests directed to this VIP is still not working.
To any assistance is highly appreciated.
4 Replies
- nathe
Cirrocumulus
"I have attached this HTTPClass profile to an HTTPS Virtual Server" can I assume you mean you've added this http class profile to a HTTP virtual server - Mike_Dayton_108
Nimbostratus
Try this:
Create your basic virtual server (https port 443). Next create a second virtual server (http port 80) to go with it. You can make the http virtual a standard http virtual without a pool and with a standard http profile. Add an http class like this one to the http virtual server only: https://[HTTP::host][HTTP::uri]
Both virtuals must use the same IP address for this to work.
- Salman_Gbadamos
Nimbostratus
Yes, Many Thanks -- I got what the problem was, I was using the same HTTPClass profile for both the HTTP and HTTPS VS, so when i change the "redirect to" in the HTTPClass; am automatically changing it for the HTTPS VS as well, so all traffic were dropped!..........
- Salman_Gbadamos
Nimbostratus
Yes, Many Thanks -- I got what the problem was, I was using the same HTTPClass profile for both the HTTP and HTTPS VS, so when i change the "redirect to" in the HTTPClass; am automatically changing it for the HTTPS VS as well, so all traffic were dropped!..........
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