diff --git a/advanced/lighttpd.conf.debian b/advanced/lighttpd.conf.debian index 53db2167..f9c96221 100644 --- a/advanced/lighttpd.conf.debian +++ b/advanced/lighttpd.conf.debian @@ -70,5 +70,10 @@ $HTTP["url"] =~ "^(?!/admin)/.*" { 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 include_shell "cat external.conf 2>/dev/null" diff --git a/advanced/lighttpd.conf.fedora b/advanced/lighttpd.conf.fedora index 6c5b035b..2dec05e4 100644 --- a/advanced/lighttpd.conf.fedora +++ b/advanced/lighttpd.conf.fedora @@ -87,5 +87,10 @@ $HTTP["url"] =~ "^(?!/admin)/.*" { 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 include_shell "cat external.conf 2>/dev/null"