Directive "map" not working with regex key and value that like "$1"

Kindy Lin kindy61 at
Thu Dec 18 15:23:51 UTC 2014


I have some configuration like:

map $host $sub {
  default  www;
  ~^(\w+)\.abc\.com$  $1;

And it not works.
I first find it in 1.1.19 and seems the latest version still have this issue.


More information about the nginx-devel mailing list