Transform rule to change path based on hostname

I have a pages app that has some custom domains setup for customers. These seem to be working and have a status of active.

I want to have a transform rule that prefixes the path of the url with “/site” when the request comes from one of these custom domains.

At the moment my custom filter expression is:
(not in {"" ""})

And my dynamic path rewrite is:
concat("/site", http.request.uri.path)

But it doesn’t seem to be working. Am I missing something obvious?