Redirect pi.hole to pi.hole/admin/

This commit is contained in:
ProtoFoo 2017-02-21 20:38:09 +01:00 committed by GitHub
parent b2d78edae9
commit 3fab34687c
1 changed files with 8 additions and 0 deletions

View File

@ -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"