Web Hosting Talk







View Full Version : Add domain pointer


aroiz
01-06-2001, 02:58 AM
How add a domain pointer?

if access to http://www.domain1.com, that redirect or point to

http://www.domain2.com

thanks for response

SI-Chris
01-06-2001, 07:54 AM
Are domain1.com and domain2.com on the same server? What flavor of server is it? Does domain1.com have a shared or unique IP address?

If domain1.com has a unique IP address (not shared with another virtual host/hosts), you can simply have your Domain Name Server address record point domain2.com to domain1.com's IP#.

If you're using an Apache server, you can edit your httpd.conf file, find the line that says "ServerName www.domain1.com" and add the line "ServerAlias domain2.com www.domain2.com" right underneath it. (You still have to set up a DNS "A" record pointing to domain1.com's IP#.)

You could also just set up domain2.com as a separate virtual host, then use an HTTP redirect meta tag (or something similar like a PHP redirect) pointing to http://www.domain1.com, but that's something of a hack.

That's how it works on my server; use this advice at your own risk. :)

aroiz
01-06-2001, 12:08 PM
Originally posted by aroiz
How add a domain pointer?

if access to http://www.domain1.com, that redirect or point to

http://www.domain2.com

thanks for response

Cobalt RaQ3

iBusinessLawyer
01-09-2001, 01:46 AM
Turns out that there is a nice tutorial on just this subject featured right now at DevShed, see http://devshed.com/Server_Side/Administration/MoreApache/page2.html.

All the best.

-- Jon

Chicken
01-09-2001, 11:18 PM
Quick fix:

Upload this .htaccess file in the web directory of domain1.com:

RewriteEngine on
RewriteBase /
RewriteRule ^(.*)$ http://domain2.com/$1 [P]

-done.