Thread: php help
View Single Post
Old 03-27-2007, 07:13 PM  
nestle
Confirmed User
 
Industry Role:
Join Date: Apr 2006
Posts: 647
Code:
<?
// this separates it into an array [0]=>sub, [1]=>domain, [2]=>tld
$exploded = explode(".", $_SERVER['HTTP_HOST']);

// just redirects to http://someotherdomain.com/sub
header("Location: http://www.someotherdomain.com/" . $exploded[0]);
?>
untested but should work.

Last edited by nestle; 03-27-2007 at 07:15 PM..
nestle is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote