Forum Discussion
Need help writing an iRule to redirect from HTTP to HTTPS but not on port 443
I need to redirect from HTTP to HTTPS if the uri contains "inscripcion". The HTTPS service for that application is published in the client's server with port 8691, not 443. I've tried the http to https redirect irule that comes with the LTM, it redirects to HTTPS but not to the 8691 port. What do I have to do?
3 Replies
- acgutierrez_123
Nimbostratus
There a VS listening to port 80 that catches all HTTP requests and sends them to different pools depending on the URI. I tried creating a VS listening to port 8691 (where the client has the HTTPS service) and apply the redirect iRule but as I said, it redirects to HTTPS but not to the site I want, for example: the website it should redirect to is https://www.example.com:8691/inscripcion/ and it redirects to https://www.example.com/inscripcion/. You would want something like this on the port 80 vip,or whichever one is the one that will issue the redirect. Should be as simple as copying the system irule and making the edit.
HTTP::redirect https://[getfield [HTTP::host] ":" 1]:8691[HTTP::uri]
- Kevin_Davies_40
Nacreous
I suggest you add a HTTP Class to the virtual that looks for inscripcion in the URL and redirects you to https://[HTTP::host]:8691[HTTP::uri]
No iRule is required if you do this.
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