Created
September 12, 2014 03:19
-
-
Save Lax/0001edfd74f20e0e72a4 to your computer and use it in GitHub Desktop.
(nginx.conf) rewrite by lua, for SEO, etc.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rewrite_by_lua ' | |
REDIR_R = { | |
["/r/1"] = "/d/1", | |
["/r/2"] = "/d/2", | |
} | |
if REDIR_R[ngx.var.uri] then | |
return ngx.redirect(REDIR_R[ngx.var.uri]); | |
end | |
'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment