Unable to save Transform Rule

Hey there,
I wanted to rewrite URl - /path/alphanumeric-id to /handler.php?id=alphanumeric-id

This is my current progress -

Value in the dynamic rewrite feild-
regex_replace(http.request.full_uri, "^/message/([a-zA-Z\d]{8,12})$", "/message.php?id=${1}")

But whenever I try to deploy it, I get this error -

My Plan - Free

Can anyone help me understand what am I doing wrong?

Your regex expression isn’t valid since you haven’t escaped the slashes.


Escape them like ^\/message\/([a-zA-Z\d]{8,12})$


1 Like

I solved the problem (most probably)

The regex in the dynamic rewrite field cannot use \d

This works - regex_replace(http.request.full_uri, "^/message/([a-zA-Z0-9]{8,12})$", "/message.php?id=${1}")

Then I received another error saying - my plan/ phase does not include matching.
Screenshot from 2022-04-28 21-27-05

thank you for the reply @KianNH. As it turns out, my plan does not include matching.