Forum Discussion
https 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 redirection using only one virtual server which is listening on https. I have the below irule configured but after redirection the page does not proceed further while authenticating with the login credentials.
when HTTP_REQUEST { if { [URI::protocol [HTTP::uri]] eq "https" } { event disable all } else { HTTP::redirect https://[getfield [HTTP::host] ":" 1]:8080[HTTP::uri]; event disable all } }
2 Replies
- youssef1
Cumulonimbus
Hi,
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
- Stanislas_Piro2
Cumulonimbus
This is a well known questions with lots of answers on Devcentral.
Look at this thread which provide the answer.
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
