2 domain and one IP-address

From: Date: Fri, 08 Dec 2000 12:06:16 +0000
Subject: 2 domain and one IP-address
Groups: php.general 
Request: Send a blank email to php-general+get-29326@lists.php.net to get a copy of this message
Hi! I have two domain and both of them have same IP-address. I have get some .asp examble how to get info from users browser what he/she have typed on it and they go right subdirectory. Examble is here: > --code begin-- > Dim Host > Host = Request.ServerVariables("HTTP_HOST") > If Host = "page2.domain.com" then > Response.Redirect("/page2/index.html") > --code ends-- But. My pages are on UNIX system, not in Microsoft Windows NT or 2000. I have get some PHP scripts but when I try to put in index.html page, Front Page 2000 moves it to <body> tag position. I think this place is wrong place. Here the PHP code: <? if ($HTTP_HOST=='page2.domain.com') { Header('Location: http://page2.domain.com/sivu2/index.html'); exit; } ?> So, do I need to change the first page index.html to index.php or can I check this HTTP_HOST in index.html. Where I put this code? Can there be other HTML in same page? How about different browser. Does both of typical, Netscape and Internet Explorer, understand this? Nowadays IE is more popular.. I have <meta http-equiv="REFRESH" content="3; URL=core.html"> tag in index.html page. Is it possible think that if all is correct, user can go 'normal' to core.html and if not, then he/she go to other page and if he/she have typed other address/domain to her/his browser. -Mika -- _juntunen@i.am________________________________(Vantaa/F1nland)____ GSM +358-41 529 0284, work/home: +358-9 8870 6121/ +358-9 823 7570

« previous php.general (#29326) next »