The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Questions about park,point & add-on Domains

Discussion in 'General Discussion' started by mvital, Jul 4, 2005.

  1. mvital

    mvital Well-Known Member

    Joined:
    May 24, 2003
    Messages:
    58
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Lisbon - PORTUGAL
    Hi all

    i have some doubts about this issues.

    i have a domain lets called maindomain.com and another one otherdomain.com i want that everytime someone visits the otherdomain.com that goes to maindomain.com ( yes i know a redirect works ) but and this is my doubt when it goes to maindomain.com at the URL browse still showing the otherdomain.com. :eek:

    its a litle confused i know ... but is this possible or some other way to do this.. :confused:

    any help will be apreciated.

    best regards,
    Mario
     
  2. ncconquer

    ncconquer Well-Known Member

    Joined:
    Jun 20, 2004
    Messages:
    80
    Likes Received:
    0
    Trophy Points:
    6
    i thing you must have decatedip.
    Give maindomain.com decatedip
    and add CName otherdomain.com to this ip.
     
  3. mvital

    mvital Well-Known Member

    Joined:
    May 24, 2003
    Messages:
    58
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Lisbon - PORTUGAL
  4. RickG

    RickG Well-Known Member

    Joined:
    Feb 28, 2005
    Messages:
    238
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    North Carolina
    This is the default behavior of a parked domain. However, you can accomplish what you want (to see the URL change in the browser) by adding a re-write rule to the .htaccess file in /public_html/ of maindomain.com. An example:

    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^(www.?)otherdomain.com$
    RewriteRule ^(.*)$ http://www.maindomain.com/$1 [R=301,L]

    Another option, if you want to play around in your httpd.conf file rather than use the .htaccess method, is to remove the parked domain ServerAlias from the existing VirtualHost container and put it into one of its own:

    <VirtualHost YourIP>
    ServerAlias otherdomain.com otherdomain.com
    Redirect permanent / http://www.maindomainname.com
    </VirtualHost>

    Hope this helps -
     
Loading...

Share This Page