What I mean, is I have a domain mydomain.com on my server. Now I have another domain mydomain2.com and I want it to point to mydomain.com. So when you type in mydomain2.com it takes you to mydomain.com. I think there is a way to do this strictly with DNS.
Why not use mydomain.com? It does exactly what you're talking about, just signup for a free account and it will do the trick. Example: my domain, sportscentralboards.com , forwards to a directory on my site.
You'll need to do one of two things. The easiest way is to simply add the second domain into your DNS pointing to the same IP as the first, then add the domain to your webserver configuration.
If you're using Apache with NameVirtualHosts, simply add mydomain2.com and mydomain2.com to the ServerAlias directive. If OTOH you aren't running VirtualHosts (eg, dedicated IP per site), you won't need to add the ServerAlias.
This method won't redirect the user; mydomain2.com will simply show the same site as mydomain.com.
If you need it to actually redirect, you might look into mod_rewrite (again, assuming Apache).
If you're not using Apache, this would be no help -- in which case you should post what server software you're using.
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.
fairhousing posted this at 03:52 — 24th August 2001.
They have: 1,587 posts
Joined: Mar 1999
is mydomain.com what ur talking about?
rivimont posted this at 04:00 — 24th August 2001.
They have: 107 posts
Joined: Mar 1999
What I mean, is I have a domain mydomain.com on my server. Now I have another domain mydomain2.com and I want it to point to mydomain.com. So when you type in mydomain2.com it takes you to mydomain.com. I think there is a way to do this strictly with DNS.
~Chris
mjames posted this at 04:10 — 24th August 2001.
They have: 2,064 posts
Joined: Dec 1999
Why not use mydomain.com? It does exactly what you're talking about, just signup for a free account and it will do the trick. Example: my domain, sportscentralboards.com , forwards to a directory on my site.
rivimont posted this at 04:12 — 24th August 2001.
They have: 107 posts
Joined: Mar 1999
Well,
I am running a server so would prefer to do it on my own.
~Chris
Jm4n posted this at 10:02 — 4th September 2001.
They have: 3 posts
Joined: Sep 2001
You'll need to do one of two things. The easiest way is to simply add the second domain into your DNS pointing to the same IP as the first, then add the domain to your webserver configuration.
If you're using Apache with NameVirtualHosts, simply add mydomain2.com and mydomain2.com to the ServerAlias directive. If OTOH you aren't running VirtualHosts (eg, dedicated IP per site), you won't need to add the ServerAlias.
This method won't redirect the user; mydomain2.com will simply show the same site as mydomain.com.
If you need it to actually redirect, you might look into mod_rewrite (again, assuming Apache).
If you're not using Apache, this would be no help -- in which case you should post what server software you're using.
Basic Linux Hosting @ $9.95/month
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.