algernon icon indicating copy to clipboard operation
algernon copied to clipboard

url rewrite and reusing index.lua

Open linkerlin opened this issue 3 years ago • 4 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.

linkerlin avatar Jul 06 '22 00:07 linkerlin

something like converting http://localhost/post/?id=1 to http://localhost/post/1/

linkerlin avatar Jul 06 '22 02:07 linkerlin

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?

xyproto avatar Jul 06 '22 09:07 xyproto

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?

Exactly!

linkerlin avatar Jul 06 '22 13:07 linkerlin

Seems like https://github.com/xyproto/algernon/issues/95 is a better handling for this? (No pun intended.)

tooolbox avatar Jul 06 '22 19:07 tooolbox

I believe this is now done with #130 but feel free to reopen if you disagree.

tooolbox avatar May 01 '23 00:05 tooolbox