RE: 2 domain and 1 IP
| From: | Colin Viebrock | Date: | Mon, 04 Dec 2000 18:43:00 +0000 |
| Subject: | RE: 2 domain and 1 IP | ||
| References: | 1 | Groups: | php.mirrors |
| Request: | Send a blank email to php-mirrors+get-3025@lists.php.net to get a copy of this message | ||
> I cannot find direct e-mail address so I hope you can nicely forward to
> right person who knows how to make right code in index.html file when we
> have two domain names and both of them have one IP address. I get
> some .asp
> code but it do not work in UNIX system; only with NT. Here the code what I
> get:
>
> --koodi alkaa--
> Dim Host
> Host = Request.ServerVariables("HTTP_HOST")
> If Host = "sivu2.domain.com" then
> Response.Redirect("/sivu2/default.asp")
> --koodi loppuu--
This would be better (and more quickly) answered on the PHP Mailing List
(http://www.php.net/support.php), but the answer is:
<?
if ($HTTP_HOST=='sivu2.domain.com') {
Header('Location: http://sivu2.domain.com/sivu2/default.asp');
exit;
}
?>