Skip to content

Commit

Permalink
No longer redirecting nodebeginner.org to www.nodebeginner.org
Browse files Browse the repository at this point in the history
  • Loading branch information
manuelkiessling committed Apr 2, 2015
1 parent b777f3c commit 43d82d6
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions header.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,6 @@
$requestUri = $_SERVER['REQUEST_URI'];
$queryString = $_SERVER['QUERY_STRING'];

if ($httpHost === 'nodebeginner.org') {
$location = 'http://www.nodebeginner.org'.$requestUri;
header('HTTP/1.1 301 Moved Permanently');
header('Location: '.$location);
die();
}

if (substr($requestUri, 0, 11) === '/index.html') {
$location = 'http://'.$httpHost.'/';
if ($queryString !== '') {
$location .= '?'.$queryString;
}
header('HTTP/1.1 301 Moved Permanently');
header('Location: '.$location);
die();
}

$pathinfo = pathinfo($_ENV['SCRIPT_FILENAME']);
$extension = $pathinfo['extension'];

Expand Down

0 comments on commit 43d82d6

Please sign in to comment.