Forum Discussion
need help with an iRule for redirection
Hi Folks, I need an iRule to work with the below logic:
We are hitting the below URL: http://nik.test.com/support/new.cgi?type=ccid&fixnos=BAO9070
Now this needs to redirect to http://newnik.test.com?type=ccid&fixnos=BAO9070
So the content after the ? will remain common, what will only need to be replaced is "http://nik.test.com/support/new.cgi" getting substituted with "http://newnik.test.com".
Thanks for the help.
Regards, Nik
4 Replies
- shaggy
Nimbostratus
This will redirect all requests to "http://newnik.test.com?(whatever the client submitted as the query)":
when HTTP_REQUEST { HTTP::redirect "http://newnik.test.com?[HTTP::query]" }- MiLK_MaN
Nimbostratus
I'm pretty sure you're going to need a trailing / after the host, so it would become http://newnik.test.com/?[HTTP::query]
- shaggy_121467
Cumulonimbus
This will redirect all requests to "http://newnik.test.com?(whatever the client submitted as the query)":
when HTTP_REQUEST { HTTP::redirect "http://newnik.test.com?[HTTP::query]" }- MiLK_MaN
Nimbostratus
I'm pretty sure you're going to need a trailing / after the host, so it would become http://newnik.test.com/?[HTTP::query]
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