local route = require("resty.route").new() route:get("=/posts/index.html", function(self) return ngx.exec("/posts/index.html") end) route:get("=/posts/", function(self) return ngx.req.set_uri("/posts/index.html", false) end) return route