Merge pull request #1241 from pi-hole/feature/redirect-pi-hole-to-admin

redirect pi.hole to pi.hole/admin
This commit is contained in:
Adam Warner 2017-02-18 20:59:03 +00:00 committed by GitHub
commit 543f1243e2
2 changed files with 10 additions and 0 deletions

View file

@ -70,5 +70,10 @@ $HTTP["url"] =~ "^(?!/admin)/.*" {
setenv.add-response-header = ( "X-Pi-hole" => "A black hole for Internet advertisements." ) setenv.add-response-header = ( "X-Pi-hole" => "A black hole for Internet advertisements." )
} }
$HTTP["host"] =~ "pi.hole$" {
setenv.add-response-header = ( "X-Pi-hole" => "Redirecting pi.hole to /admin." )
url.rewrite = ( "^(.*)" => "/admin$1" )
}
# Add user chosen options held in external file # Add user chosen options held in external file
include_shell "cat external.conf 2>/dev/null" include_shell "cat external.conf 2>/dev/null"

View file

@ -87,5 +87,10 @@ $HTTP["url"] =~ "^(?!/admin)/.*" {
setenv.add-response-header = ( "X-Pi-hole" => "A black hole for Internet advertisements." ) setenv.add-response-header = ( "X-Pi-hole" => "A black hole for Internet advertisements." )
} }
$HTTP["host"] =~ "pi.hole$" {
setenv.add-response-header = ( "X-Pi-hole" => "Redirecting pi.hole to /admin." )
url.rewrite = ( "^(.*)" => "/admin$1" )
}
# Add user chosen options held in external file # Add user chosen options held in external file
include_shell "cat external.conf 2>/dev/null" include_shell "cat external.conf 2>/dev/null"