• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 185
  • Last Modified:

redirecting one domain to another

Lets see if I can write this without getting sidetracked.  I have two domains.  domain.net and domain.com.  The domain.com was pointing to another site, and domain.net is pointing to our existing site.  I have setup domain.com to point to the new site, I would like anyone who has domain.net bookmarked or uses that to come into the site to go to the .com domain.  Also I would rather it be something I little more robust then setting up a fake domain just to put in a redirect page, as I have about 5 more domains that I will have to do the same thing with.

Any thoughts?
0
jrachiever72
Asked:
jrachiever72
1 Solution
 
petmagdyCommented:
their r servral schemas to do this:

1- put a page on the old domain to sendRedirect to the new page
2- the Network people have a let of solutions to that , they may make both domains point to the same IP
3- ur name is Apache and Apache web server supports virtual hosts to be able to host multiple domains
4- Others also
0
 
jrachiever72Author Commented:
Wanted something a little more robust then that solution as it will cause more work down the road.
The domains already point to the same IP address.
I have these two domains, and a domain that goes to a different set of code.
0
 
periwinkleCommented:
Does the old domain.net setup have the same page structure as the new domain.com?  If so, you could simply do a permanent redirect in domain.net's setup:

Redirect Permaent / http://www.domain.com/
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
mrielfCommented:
Place this into your apache config:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.domain\.net$ [NC]
RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L]
RewriteCond %{HTTP_HOST} ^domain\.net$ [NC]
RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L]

0
 
jrachiever72Author Commented:
mrielf,

Is that inside the Virtual Host for the .net domain?
0
 
mrielfCommented:
Yes.

But make sure you enabled the rewrite_module
0
 
jrachiever72Author Commented:
sweet
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now