I have a URL of the form
http://example.com/fetchjobs.action?jobType=crons&jobList=foo&categoryModeId=0&showOnlyLatest=true
And I want to redirect above url to url below
http://newexample.com/crons?jobList=foo&categoryModeId=0&showOnlyLatest=true
Note:
domain got changed from example.com to newexample.com.
Value of "jobType" is in a URL path now instead of query param. (jobType=crons vs /crons?)
All other query parameters are retained as query params in a new URL.
There can be any number of query parameters in source URL.
Leads here is appreciated.