From b2d78edae93c0762403e7beceac898c1d2b741ae Mon Sep 17 00:00:00 2001 From: ProtoFoo Date: Tue, 21 Feb 2017 20:36:59 +0100 Subject: [PATCH 1/4] 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" From 3fab34687c5fb7fd85e0cd8e95db6eaeae9f0847 Mon Sep 17 00:00:00 2001 From: ProtoFoo Date: Tue, 21 Feb 2017 20:38:09 +0100 Subject: [PATCH 2/4] Redirect pi.hole to pi.hole/admin/ --- advanced/lighttpd.conf.fedora | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/advanced/lighttpd.conf.fedora b/advanced/lighttpd.conf.fedora index 6c5b035b..d7bc823f 100644 --- a/advanced/lighttpd.conf.fedora +++ b/advanced/lighttpd.conf.fedora @@ -87,5 +87,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" From cd0b8927c5b14c6667899c30efc05833cd688383 Mon Sep 17 00:00:00 2001 From: ProtoFoo Date: Tue, 21 Feb 2017 22:22:03 +0100 Subject: [PATCH 3/4] Removed a line that did nothing. --- advanced/lighttpd.conf.debian | 1 - 1 file changed, 1 deletion(-) diff --git a/advanced/lighttpd.conf.debian b/advanced/lighttpd.conf.debian index 9e554242..334016d4 100644 --- a/advanced/lighttpd.conf.debian +++ b/advanced/lighttpd.conf.debian @@ -73,7 +73,6 @@ $HTTP["url"] =~ "^(?!/admin)/.*" { # 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/" ) } } From fb6631d317bbf8af8d470d495679958dea6a1c69 Mon Sep 17 00:00:00 2001 From: ProtoFoo Date: Tue, 21 Feb 2017 22:22:30 +0100 Subject: [PATCH 4/4] Removed a line that did nothing. --- advanced/lighttpd.conf.fedora | 1 - 1 file changed, 1 deletion(-) diff --git a/advanced/lighttpd.conf.fedora b/advanced/lighttpd.conf.fedora index d7bc823f..752d4446 100644 --- a/advanced/lighttpd.conf.fedora +++ b/advanced/lighttpd.conf.fedora @@ -90,7 +90,6 @@ $HTTP["url"] =~ "^(?!/admin)/.*" { # 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/" ) } }