Nginx double rewrite test

Youngsoo Lee 2016-11-16 16:32:27

properties

* config location ~ /a { rewrite ^ /b?var1=a; } location ~ /b { rewrite ^ /c?var2=b; }

input

1
2
3
/test
/a
/b

output

Rewritten URL Parameter  
2
/b
var1=a
 
/c
var2=b&var1=a
 
3
/c
var2=b
 

comments