Forum Discussion
Redirection Issue
Hi Team,
We are using HTTP and HTTPS Virtual-Server profile, so we are trying to put the below new Irule into both:
when HTTP_REQUEST { set https_uri [string tolower [HTTP::uri]] if { $https_uri equals "/broutlet/*" } { HTTP::redirect "http://abc.xyz.com/broutlet/br/pt/" } }
But issue is that if we try browsing ::http://test.xyz.com/broutlet/ it will redirect to http://abc.xyz.com/broutlet/br/pt/
But other extensions not working:, lets say if we browse something like: http://test.xyz.com/broutlet/jt/pt or any other extension.
How to solve this.
Thanks and Regards Parveez
1 Reply
- Cory_50405
Noctilucent
Try this, which should keep the HTTP host the same (your rule above is always redirecting to abc.xyz.com) and properly redirect to URI /broutlet/br/pt/ if that's not the URI specified:
when HTTP_REQUEST { if { ! [string tolower[HTTP::uri]] eq "/broutlet/br/pt" } { HTTP::redirect "http://[HTTP::host]/broutlet/br/pt/" } }
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