Forum Discussion
irule to change url with preserving query parameters and include extra names in the final url
- Nov 23, 2018
I have tried below irule, added in the irule list and it worked correctly :
when HTTP_REQUEST { if {[string tolower [HTTP::uri]] starts_with "/test_check.do?test_id="} { HTTP::redirect "https://xyz.com/testing[HTTP::uri]" } }
Thanks you all for your responses.
Hi, result of [URI::query [HTTP::uri]] in your case is just test_id=XXX. But you want to preserve all parts of the path. Is it correct? Try this: … https://xyz.com/testing[HTTP::uri] …
Yes i want to preserve all parameters. I have tried your suggestion, its not working, getting 404 error.
string tolower [HTTP::uri]] starts_with "/test_check"
Should i change "starts_with" with some other function like contains ?
Please suggest.
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