Thread: php help
View Single Post
Old 03-27-2007, 07:17 PM  
ztik
Confirmed User
 
ztik's Avatar
 
Industry Role:
Join Date: Aug 2001
Location: Nomad
Posts: 5,196
Quote:
Originally Posted by nestle View Post
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.

cool i'll try it, thanks for the help
__________________
.
ztik is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote