Forum Discussion
Help with an irule
Hello F5 Champs,
I am new to F5 and have just started working on it since the past few months.. still trying to learn the nitty gritty of F5s and i rules.. Need some guidance with the below task (creating an irule)
The users are currently accessing http://abc.xyz.com:8080.. The application team is planning to change the application to https with the new URL as https://abc.xyz.com:8443
The requirement here is that if the user hits http://abc.xyz.com:8080 , it should redirect to the new one i.e. https://abc.xyz.com:8443
Any help/guidance would be much appreciated
Thanks
- Dario_Garrido
Noctilucent
Hello.
To do so, you should create a VS listening in port 8080 and apply an iRule like this
when HTTP_REQUEST { HTTP::respond 301 Location "https://[HTTP::host]:8443[HTTP::uri]" }
After that, you should create another VS listening in port 8443 with an client_SSL profile to process all the requests.
KR,
Dario.
- Luca_Comes
Cirrus
Hello,
I think you can do the same also with a redirect profile applied to your virtual server running on port 8080. As Dario said you have to configure also a new virtual server listening on port 8443.
- David_M
Cirrostratus
Redirect profile or you mean redirect in http profile?
How exactly is this used, cant find any place to add the new URL!
- Dario_Garrido
Noctilucent
I think Luca means to use a policy for redirection (instead of an iRule)
REF - https://www.youtube.com/watch?v=xk0SeeDEg1Y
REF - https://f5-agility-labs-adc.readthedocs.io/en/latest/class3/module6/lab6.html
KR,
Dario.
Thanks Dario & Lucas
- Luca_Comes
Cirrus
Yes sorry, I was meaning a redirect policy as Dario said.
Luca
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