With the plugin you can rewrite URLs by regular expressions.
In this example we will rewrite a simple URL. Take a look at the URL:
https://api.predic8.de/shop/v2/products/
We want to access this API with the path store/products/. To do this we have to replace the part /store/ from the context path with /shop/v2. We can achieve this by using the rewriter plugin as follows:
-
Go to the
examples/routing-traffic/rewriter/regexdirectory. -
Execute
membrane.cmd -
Open the URL http://localhost:2000/store/products/ in your browser.
See:
- rewriter reference