Merge pull request #1265 from ProtoFoo/ProtoFoo-redirect

Redirect pi.hole to pi.hole/admin/
This commit is contained in:
Jacob Salmela 2017-02-21 15:49:19 -06:00 committed by GitHub
commit 0fe5efba76
2 changed files with 14 additions and 0 deletions

View file

@ -70,5 +70,12 @@ $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"] == "/" {
url.redirect = ( "" => "/admin/" )
}
}
# Add user chosen options held in external file
include_shell "cat external.conf 2>/dev/null"

View file

@ -87,5 +87,12 @@ $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"] == "/" {
url.redirect = ( "" => "/admin/" )
}
}
# Add user chosen options held in external file
include_shell "cat external.conf 2>/dev/null"