Change URL, but only for pages

Here is an example of how to use the component, though. In your case, you would exclude paths that contain assets or mediaetc.´

Note that the example uses now deprecated $original($path, $options) which should be replaced as indicated in the docs.