Injecting url params

Hi Martin,

Finally I have figured out a regex that would do the trick. I have tried it in a regex tool named Expresso. However, when I applied it to the API, it didn’t work as expected.

I have no idea about the engine executing regex.

I am applying the url rewrite as follows:

-Path: events
-Match Pattern: (?(^events(/)?(?)?.jurisdiction=.$)(events(/)?(?)?(.)(?:[?]?jurisdiction=([^&])&?)(.))|(events(/)?(?)?(.)))
-Rewrite To: EventsRealtimeNoGeoOttawa/events/?jurisdiction=ottawa.mto.gov.on.ca&$6$8$12

This is supposed to run as follows for the following example path:

-Requested path: events?format=xml&jurisdiction=a
-Rewritten path should become: EventsRealtimeNoGeoOttawa/events/?jurisdiction=ottawa.mto.gov.on.ca&format=xml&
-Rewritten path returned from tyk: EventsRealtimeNoGeoOttawa/events/?jurisdiction=ottawa.mto.gov.on.ca&?format=xml&jurisdiction=a

Please I need your advice.