redirecting one domain to another

Posted on 2004-11-05
Last Modified: 2010-08-05
Lets see if I can write this without getting sidetracked.  I have two domains. and  The was pointing to another site, and is pointing to our existing site.  I have setup to point to the new site, I would like anyone who has 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?
Question by:jrachiever72
    LVL 13

    Expert Comment

    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

    Author Comment

    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.
    LVL 15

    Expert Comment

    Does the old setup have the same page structure as the new  If so, you could simply do a permanent redirect in's setup:

    Redirect Permaent /
    LVL 5

    Accepted Solution

    Place this into your apache config:

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


    Author Comment


    Is that inside the Virtual Host for the .net domain?
    LVL 5

    Expert Comment


    But make sure you enabled the rewrite_module

    Author Comment


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    As Wikipedia explains 'robots.txt' as -- the robot exclusion standard, also known as the Robots Exclusion Protocol or robots.txt protocol, is a convention to prevent cooperating web spiders and other web robots from accessing all or part of a websit…
    In Solr 4.0 it is possible to atomically (or partially) update individual fields in a document. This article will show the operations possible for atomic updating as well as setting up your Solr instance to be able to perform the actions. One major …
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now