PingAccess

Rewrite content rule examples

This table provides examples of rewrite content rule use cases and their results.

Example description Original content Content type Find criteria Replacement value Modified text

Rewrite URL portion of a web link

<a href="https://serverx.inside.corp/app/">

text/html

serverx.inside.corp

www.acme.com

<a href="https://www.acme.com/app/">

Case-sensitive text replacement

ACMEcorp

text/html

Ecorp

E Corporation

ACME Corporation

Value masking

{
  "origin": "127.0.0.1, 192.168.1.1"
}

application/json

(127.0.0.1, ).*"

*"

{
  "origin": "127.0.0.1, *"
}

Replacing text inside a specified element using Java regex groups

This text is bold.

text/html

<b>(bold)</b>

not $1

This text is not bold.

Case-insensitive text replacement using a Java regex match flag

HTTP

text/html

(?i)http

FTP

FTP