"true") is configured in lighttpd, // append $serverName to $authorizedHosts array_push($authorizedHosts, $serverName); } else if (!empty($_SERVER["VIRTUAL_HOST"])) { // Append virtual hostname to $authorizedHosts array_push($authorizedHosts, $_SERVER["VIRTUAL_HOST"]); } // Determine block page type if ($serverName === "pi.hole" || (!empty($_SERVER["VIRTUAL_HOST"]) && $serverName === $_SERVER["VIRTUAL_HOST"])) { // Redirect to Web Interface header("Location: /admin"); exit(); } elseif (filter_var($serverName, FILTER_VALIDATE_IP) || in_array($serverName, $authorizedHosts)) { // When directly browsing via IP or authorized hostname // Render splash/landing page based off presence of $landPage file // Unset variables so as to not be included in $landPage or $splashPage unset($authorizedHosts); // If $landPage file is present if (is_file(getcwd()."/$landPage")) { unset($serverName, $viewPort); // unset extra variables not to be included in $landpage include $landPage; exit(); } // If $landPage file was not present, Set Splash Page output $splashPage = << ● $serverName
Pi-hole logo

Pi-hole: Your black hole for Internet advertisements

Did you mean to go to the admin panel?
EOT; exit($splashPage); } header("HTTP/1.1 404 Not Found"); exit(); ?>