note 20697 added to ref.http

From: Date: Fri, 12 Apr 2002 17:55:30 +0000
Subject: note 20697 added to ref.http
Groups: php.notes 
Request: Send a blank email to php-notes+get-29168@lists.php.net to get a copy of this message
I have been working on a script to redirect based on the URL entered by the user (I have two domains pointed at the same place). I tried several different ways and just now got it working. Here is the script. I hope someone finds it useful. <? //URL Redir 1.0 //by Randall Fitzgerald $ser = $HTTP_HOST; $bob = "www.slurpeeofdoom.com"; if($ser == $bob) { header("Location: http://www.slurpeeofdoom.com/slurpee/"); } else { header("Location: http://www.condomreview.org/condom/"); } ?> <HTML> <HEAD> </HEAD> <BODY> transferring... </BODY> </HTML> -- http://www.php.net/manual/en/ref.http.php http://master.php.net/manage/user-notes.php?action=edit+20697 http://master.php.net/manage/user-notes.php?action=delete+20697 http://master.php.net/manage/user-notes.php?action=reject+20697

« previous php.notes (#29168) next »