Add deep URI rewriting for groups and settings pages

Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
DL6ER
2023-05-26 21:51:17 +02:00
parent 06e89c5781
commit 9cb652bbc6
6 changed files with 51 additions and 51 deletions

View File

@@ -11,7 +11,7 @@
starttime = mg.time(true)
hostname = pihole.hostname()
-- Get name of script by matching whatever is after the last "/" in the URI
scriptname = mg.request_info.request_uri:match("/([^/]*)$")
scriptname = mg.request_info.request_uri:match(pihole.webhome().."(.*)$")
-- Fall back to "index.lp" if no match is found (e.g. when accessing the root)
if scriptname == nil or string.len(scriptname) == 0 then scriptname = "index.lp" end