There are two ways to do this. Either you can use a bit of scripting (e.g. PHP) to customize the page. In PHP:
PHP Code:
$_SERVER['HTTP_HOST'];
should contain the domain of the current site which has been requested. You could then process this to output the correct information.
Alternately, you could redirect using that, with a simple PHP page as your main page redirecting to the correct home page on the server.
The final option would be to use .htaccess. Create a .htaccess file in the main directory on your server and put the following code in it:
# redirect domain2.com to subdir
Code:
RewriteEngine On
Options +FollowSymlinks
RewriteBase /
RewriteCond %{HTTP_HOST} domain2.com
RewriteCond %{REQUEST_URI} !subdirectory/
RewriteRule ^(.*)$ subdirectory/$1 [L]
replacing domain2.com and subdirectory with the appropriate information.
|