Forum Discussion
Need an Irule for the below url--request and suggestion
Hello All,
what requires is mentioned below.
https://uat.toolboxbo.kamlesh.com/toolbox Shoud redirect to http://cfrsv50143005ap.p2-eu.kamlesh.net:9080/toolbox
https://uat.toolboxbo.kamlesh.com/toolbox?example=123 Shoud redirect to http://cfrsv50143005ap.p2-eu.kamlesh.net:9080/toolbox?example=123
General rule: everything after the / should be keeped in the redirection
https://uat.toolboxbo.kamlesh.com/somethingelse Shoud redirect to http://cfrsv50143005ap.p2-eu.kamlesh.net:9080/somethingelse
This is the requirement. Could someone please suggest on the same. Thanks in advance.
4 Replies
- IheartF5_45022
Nacreous
Try this;-
when HTTP_REQUEST { if {[HTTP::host] eq "uat.toolboxbo.kamlesh.com"} { HTTP::respond 301 Location "http://cfrsv50143005ap.p2-eu.kamlesh.net:9080[HTTP::uri]" Connection "close" noserver return } } - kamlyada_209668
Nimbostratus
@ IheartF5 -- Thanks for all your help its working fine.
Redirection is good and working for both Url with above IRule but client wants to keep original url in the browser. Means need to redirect both the url above and also keep original url in browser in both cases of redirection. Could someone please suggest on the same. Thanks in advance.
- kamlyada_209668
Nimbostratus
Anyone please help to solve the above issue ..Thanks in advance.
- IheartF5_45022
Nacreous
OK so it's not a redirect you want - it's a proxy. You don't need an iRule for this
- Create a pool pl_cfrsv50143005ap.p2-eu.kamlesh.net_9080 with member x.x.x.x:9080, where x.x.x.x is the IP that cfrsv50143005ap.p2-eu.kamlesh.net resolves to
- Create a virtual server vs_uat.toolboxbo.kamlesh.com_https with a clientsssl profile and pool pl_cfrsv50143005ap.p2-eu.kamlesh.net_9080 attached
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