From b2d78edae93c0762403e7beceac898c1d2b741ae Mon Sep 17 00:00:00 2001 From: ProtoFoo Date: Tue, 21 Feb 2017 20:36:59 +0100 Subject: [PATCH] Redirect pi.hole to pi.hole/admin/ --- advanced/lighttpd.conf.debian | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/advanced/lighttpd.conf.debian b/advanced/lighttpd.conf.debian index 53db2167..9e554242 100644 --- a/advanced/lighttpd.conf.debian +++ b/advanced/lighttpd.conf.debian @@ -70,5 +70,13 @@ $HTTP["url"] =~ "^(?!/admin)/.*" { setenv.add-response-header = ( "X-Pi-hole" => "A black hole for Internet advertisements." ) } +# Entering just "pi.hole" into a browser redirects to "pi.hole/admin/" +$HTTP["host"] == "pi.hole" { + $HTTP["url"] == "/" { + setenv.add-response-header = ( "X-Pi-hole" => "Redirecting pi.hole to /admin/." ) + url.redirect = ( "" => "/admin/" ) + } +} + # Add user chosen options held in external file include_shell "cat external.conf 2>/dev/null"