String replace on rewrite module

jbruni nginx-forum at
Tue Jul 20 17:22:30 MSD 2010

My goal is simple. Rewrite the following URL:




My doubt is: how can I transform [b]path/to/folder[/b] into

In fact, all I want to know is how to [b]substitute the forward slashes
"/" by underscores "_"[/b]

The path/to/folder can be nested in unknown levels (as in
path/to/a/very/deep/level/folder )

Is there a "string replace" function in rewrite module to do this? Or
something else?


Posted at Nginx Forum:,110833,110833#msg-110833

More information about the nginx mailing list