<jo*********@f1help.org> wrote in message
news:<10*************@corp.supernews.com>...
I'm looking for some code to split a website that is hosted on one server.
For example: I have the domain www.firstone.com and www.secondone.nl
They're both hosted at one provider. So far no problems. The ISP makes the
changes in the dns and when you type in the urls you'll arrive at the same
website's index.html
But, I want to create a separate entrance for the english part of the
website and a separate entrance for the dutch website.
The best solution is to configure your Web server appropriately.
If you are running Apache, you should use mod_rewrite. Depending
on which site is being requested, mod_rewrite will redirect the
request to the appropriate file without user noticing anything.
A more PHP-oriented solution (one of many possible) would be to
place this file in your root directory as index.php:
<?php
if (strstr(strtolower($_SERVER['SCRIPT_URI']), 'secondone.nl'))) {
header('Location: http://www.secondone.nl/hollands/');
} else {
header('Location: http://www.firstone.com/english/');
}
?>
Needless to say, your Dutch site would be hosted in the /hollands
directory, while your English site would be located in the /english
directory...
Cheers,
NC