Hell
On Tue, Oct 2, 2012 at 10:08 AM, om <omadrid@agrega.hn> wrote:
> Hi
> I want do a rewrite with nginx
>
> server.domain.com to www.domain.com/page.html
>
There's various different kinds of "rewrite" in the Nginx world. For
example, HTTP 301/302 redirects, pure internal URI rewrites, and
internal redirects.
Check out the standard "rewrite" directive provided by the ngx_rewrite module:
http://wiki.nginx.org/HttpRewriteModule#rewrite
Or if you prefer doing this in Lua, then check out the following Lua
APIs provided by ngx_lua and pick up the one that fits your needs
best:
http://wiki.nginx.org/HttpLuaModule#ngx.req.set_uri
http://wiki.nginx.org/HttpLuaModule#ngx.redirect
http://wiki.nginx.org/HttpLuaModule#ngx.exec
BTW, pure English posts are encouraged to go to the openresty-en
mailing list instead: https://groups.google.com/group/openresty-en And
it's highly recommended to subscribe to the mailing list before
posting ;)
Thanks!
-agentzh