Forum Discussion
Redirect iRule from one HTTPS to another HTTPS
I am new with iRules and I need help to setup an iRule for a website. We have an APP that is setup to use https and working externally fine(It's configured using a vs on 443 pool on 3003 and a ssl client and ssl server profile) and get externally HTTPS://xxxxxx:3003/aaa, HTTPS://yyyyyy:3003/aaa and HTTPS://yyyyyy.com/aaa what I am trying to do is
1) Drop or reject externally everything but HTTPS://yyyyyy.com/aaa
2) Redirect HTTPS://yyyyyy.com/aaa and HTTP://yyyyyy.com/aaa to HTTPS://yyyyyy.com
If someone can help me I'll really appreciate it
Thank you in advance
Richard
4 Replies
- Vijay_E
Cirrus
Unless I am missing something, your requirement will cause a reject action for any traffic flow:
For HTTPS traffic, based on rule-2, HTTPS://yyyyyy.com/aaa will be redirected to HTTPS://yyyyyy.com/ and this will be rejected based on rule-1.
- GLF_77239
Nimbostratus
Thank you for your quick quick answer.
on point 1 what I am trying to do is mask the server name and port
on point 2 I would like to get a redirect irule from whatever the client is typing
HTTPS://yyyyyy.com/aaa or HTTP://yyyyyy.com/aaa to HTTPS://yyyyyy.com.
Do not worry about point 1 but at least get the irule for point 2
Thank you in advance
Richard
- Vijay_E
Cirrus
For better flow of answer, if you are posting something as a follow-up to an answer, add a "comment" instead of adding an "answer". It helps others to better understand the current status.
The server information won't be visible to the client. So, you don't really have to worry about it.
You would have to attach this iRule to the VS:443 & VS:80
when HTTP_REQUEST { if { ([HTTP::host] eq "domain.com") and ([HTTP::uri] eq "/aaa") } { HTTP::respond 301 Location "https://domain.com/" } } - GLF_77239
Nimbostratus
I will test the irule that you sent me to my VS on 443 and let you know if it works. The port 80 is being used for another APP and I can't touch it. They configured the APP to work only on 443. I am sorry to send my comments as an answer.(my first time using devCentral)
Thank you again!
Richard
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