Forum Moderators: phranque
Assuming you're on a shared-hosting setup, and have access to Apache mod_rewrite, you can use use this code in an .htaccess file in the web root directory of your account - the directory where your "home page" resides:
Options +FollowSymLinks
RewriteEngine on
RewriteCond {HTTP_HOST} ^(www\.)?domain2\.com [NC]
RewriteRule ^(.*)$ http://www.domain1.com/$1 [R=301,L]
Reference: Introduction to mod_rewrite [webmasterworld.com]
HTH,
Jim