Apache redirect from one domain to another domain
Posted
by cpuguru
on Super User
See other posts from Super User
or by cpuguru
Published on 2010-03-22T16:53:59Z
Indexed on
2010/03/22
17:01 UTC
Read the original article
Hit count: 528
Like many users, we tend to register the *.com and *.net versions of our domain names to prevent nefarious squatters. So if we wanted "foo.com" we'd also register "foo.net" and have them both resolve to the same IP address.
Trying to set up Apache for the first time and need to know the proper way to redirect requests to "foo.net" to go to "foo.com" instead so that if a user types in "foo.net" they get magically redirected to "foo.com".
I've been reading through the Apache URL Rewriting guide (http://httpd.apache.org/docs/1.3/misc/rewriteguide.html) and it's not readily apparent how to do this seemingly simple task.
Please advise this apprentice oh wise Apache jedi...
© Super User or respective owner