Strange rewrite_by_lua outcome

Tim Mensch tim-nginx at
Mon Oct 17 17:45:26 UTC 2011

On 10/17/2011 10:33 AM, Nginx User wrote:
> Let me get this right. Do I need to always escape the "\" inserted
> to escape "." in "\." in lua and then add another couple of "\"s?
> I.E., do I need to do "sqlpatch\\\\.php" to get "sqlpatch\.php"
> passed to the regex finally? IOW, do I basically replace each "\"
> with "\\\\"?


> If I understand agentzh, the rewrite module handles this behind the
> scenes and allows us to use familiar syntax. Is that right?

The rewrite module apparently changes how the string is parsed in the
Nginx file, yes.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx mailing list