Skip to content

Commit

Permalink
redirecting from nodebeginner.org to www.nodebeginner.org
Browse files Browse the repository at this point in the history
  • Loading branch information
manuelkiessling committed Mar 6, 2012
1 parent e0e42e7 commit 49cc3f7
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions header.php
Expand Up @@ -6,6 +6,13 @@
$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 !== '') {
Expand Down

0 comments on commit 49cc3f7

Please sign in to comment.