Injecting url params

Hi Ahmad,

I still don’t think that your Regex is correct, when I apply it to your test URL it matches the wrong part of the string, it should match the entire thing in order trap groups:

The error you are getting is probably a compilation error from the OLD URL rewrite (it can take a few seconds to propagate to our cloud / hybrid (tail the logs to be sure that the new API def has been picked up, because that was the same error I got with your Old regex).

You new one seems to partially work, a least in my debug environment:

> [Mar  5 10:14:52]  INFO URL Re-written from: /closed/events?format=xml&jurisdiction=a
> [Mar  5 10:14:52]  INFO URL Re-written to: EventsRealtimeNoGeoOttawa/events/?jurisdiction=ottawa.mto.gov.on.ca&events?f1

I’m not a regex expert, so I can’t really guide on how to write one :-/ But I can help you validate yours.

1 Like