Merge pull request #1297 from raincoats/development

Redirect to admin panel when accessing 'http://pi.hole/'
pull/1404/head
Dan Schaper 7 years ago committed by GitHub
commit bfc4775b34

@ -12,6 +12,14 @@ function validIP($address){
$uri = escapeshellcmd($_SERVER['REQUEST_URI']);
$serverName = escapeshellcmd($_SERVER['SERVER_NAME']);
// If the server name is 'pi.hole', it's likely a user trying to get to the admin panel.
// Let's be nice and redirect them.
if ($serverName === 'pi.hole')
{
header('HTTP/1.1 301 Moved Permanently');
header("Location: /admin/");
}
// Retrieve server URI extension (EG: jpg, exe, php)
ini_set('pcre.recursion_limit',100);
$uriExt = pathinfo($uri, PATHINFO_EXTENSION);

Loading…
Cancel
Save