url rewrite and reusing index.lua
linkerlin opened this issue ยท 5 comments
One ring rule them all!
One index.lua
can rule
the whole directory for saving a lot of index.lua
in every sub-dir.
url: https://www.xxx.net/alotoffiles/index.lua
url: https://www.xxx.net/alotoffiles/123/
url: https://www.xxx.net/alotoffiles/123/666/
All of them both use the index.lua
in the alotoffiles
for rendering.
something like converting
http://localhost/post/?id=1
to
http://localhost/post/1/
So, for example, if index.lua
exists, but not 1/index.lua
, then Algernon could check if index.lua
contains a handler for /1
, possibly by calling a function in index.lua
to check?
So, for example, if
index.lua
exists, but not1/index.lua
, then Algernon could check ifindex.lua
contains a handler for/1
, possibly by calling a function inindex.lua
to check?
Exactly!