Permalink
Browse files

redirecting from nodebeginner.org to www.nodebeginner.org

  • Loading branch information...
1 parent e0e42e7 commit 49cc3f7993de49c2c2d13794533587406fa4b7ae @manuelkiessling committed Mar 6, 2012
Showing with 7 additions and 0 deletions.
  1. +7 −0 header.php
View
@@ -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 !== '') {

0 comments on commit 49cc3f7

Please sign in to comment.