Direkt zum Inhalt | Direkt zur Navigation

Benutzerspezifische Werkzeuge

Sektionen
Sie sind hier: Startseite / Sonstiges / Usefull insigths / nginx map breaks positional parameters in rewrite

nginx map breaks positional parameters in rewrite

This seems to be a known problem and might be fixed in the future.

 

using $1,$2 in rewrites that take place after map has matched something fails.

so use named parameters instead

 

rewrite a(.*) yolo$1

becomes

rewrite a(?<myname>.*) yolo$myname