Replace rules in paths
Replacement rules allow to modify strings in real time in web content pages before send to browsers. This can be done by search patterns and replacement variables.
This feature is available in Artica v.4.30 with Service pack unstable v967 or Artica v4.40.
Replacement rules allow to modify strings in real time in web content pages before send to browsers.
This can be done by search patterns and replacement variables.
These rules are typically used when the remote site adds hard links to its website.
Let's say you want to reverse-proxy artica-proxy.com from articatech.com from the /about path.
When the artica-proxy.com page is displayed from https://articatech.com/about, some links to https://artica-proxy.com will be displayed because they have been hardcoded.
It is then necessary to replace on the fly the value artica-proxy.com/ with articatech.com/about/
- Click on your desired path in the “Paths” list.
- On your path parameters, select the “Replace rules” tab.
- Click on New rule.

- Add the description of the rule.
- In pattern, give the string to search in web pages.
Defines a string to replace and a replacement string.
The string to be replaced is compared without regard to case.
The string to be replaced and the replacement string may contain variables.
Multiple rules can be specified at the same configuration level.
These directives are inherited from the previous configuration level if and only if no replacement rule is defined at the current level.
Regex can be also used, examples:
http(s)?://(www.)?proxied.page.com/ to http$1://$http_host/
http(s)?://(www.)?proxied2.page.com/ to http$1://$http_host/
