if (not lighty.stat(lighty.env["physical.path"])) then if (string.match(lighty.env["uri.path"], "^(/?[^/]*/)files/$")) then lighty.env["physical.rel-path"] = "index.php" else n, a = string.match(lighty.env["uri.path"], "^(/?[^/]*/)files/(.+)") if a then lighty.env["physical.rel-path"] = "wp-content/blogs.php" lighty.env["uri.query"] = "file=" .. a else n, a = string.match(lighty.env["uri.path"], "^(/?[^/]*/)(wp-.*)") if a then lighty.env["physical.rel-path"] = a; else n, a = string.match(lighty.env["uri.path"], "^(/?[^/]*/)(.*\.php)$") if a then lighty.env["physical.rel-path"] = a else lighty.env["physical.rel-path"] = "index.php" end end end end lighty.env["physical.path"] = lighty.env["physical.doc-root"] .. lighty.env["physical.rel-path"] end