<?php
if (!$_SERVER['HTTP_HOST']) {
  $cpg_host=$HTTP_SERVER_VARS['HTTP_HOST'];
} else {
  $cpg_host=$_SERVER['HTTP_HOST'];
}
$cpg_path='/mystuff';
header("Location: http://".$cpg_host.$cpg_path);
exit;
?>