So is "rewrite_by_lua" also evil?

Nginx User nginx at
Sun Oct 16 15:43:22 UTC 2011

On 16 October 2011 14:11, agentzh <agentzh at> wrote:
> Sorry, I've changed my mind and changed the ngx.req.set_uri() API a
> bit in ngx_lua v0.3.1rc14. Now it's required to trigger location jump
> explicitly and the above example should be rewritten as
>    location @pretty_urls {
>        rewrite_by_lua '
>            if ngx.var.uri == "/sometext/xyz.html" then
>                -- the following function never returns
>                -- when the second ("jump") arg is true
>                ngx.req.set_uri("/abc.html", true)
>            end
>            ngx.exec("@proxy");
>        ';
>    }
>> See the documentation here for details:
> I've also updated the document accordingly. Sorry for the
> inconvenience but I'd preserve the right to change APIs that haven't
> been in any formal releases of my modules :)

No problem and to be expected ... which is why I normally don't
install the rc versions and why I am still at 0.3.1rc11 which works
just fine for me.
I'll stay with 0.3.1rc11 and swing back to the formal release cycle
down the line.
I'll also keep the rewrite module as my default tool (A series of one
line "rewrite a b last" calls is easier to deal with) and use
rewrite_by_lua when I need more flexibility ... taking care as

 It is nice to have the option.


More information about the nginx mailing list