Aller au contenu. | Aller à la navigation

Outils personnels

Navigation
Vous êtes ici : Accueil / 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