1

Seems like an odd request but I'm wondering if it's possible to alter values in nginx just by specifying several of its values. I've proxied my business website through nginx so I can have different web addresses for each region I'm based in.

For example my website has multiple different mobile numbers all starting with 075. My main website shows the mobile numbers available for that region. However when accessed through my nginx proxy I want to alter them all to a different single mobile number.

Is it possible to use the sub_filter command just by specifying the first 3 digits and telling it to include 8 digits after it?

2
  • There is an optional directive called subs_filter which accepts a regular expression instead of a fixed string. Not sure if it's a viable solution for you, as you will need to rebuild Nginx. See this link. Feb 2 '21 at 9:38
  • Thank you that seems to be what I'm after, do you have an example of how to use it? Feb 2 '21 at 12:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.