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.

Addon domain redirects to main domain

Discussion in 'General Discussion' started by prkl, Sep 12, 2010.

  1. prkl

    prkl Member

    Joined:
    Sep 7, 2010
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    I was wondering what im doing wrong in httpd.conf because i have maindomain.com which acts right but when i added addons domains via cpanel they redirects to my maindomain.com. i can access to addon domain files like: maindomain.com/addondomain.com only. in htaccess i have default wordpress configs in it nothing else.
     
  2. linux7802

    linux7802 Well-Known Member

    Joined:
    Dec 14, 2007
    Messages:
    232
    Likes Received:
    1
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Use following code in .htaccess file present in root of your main domain

    RewriteCond %{HTTP_HOST} ^(www\.)?addondomain\.com
    Rewriterule .* - [L]

    Replace addondomain with your addon domain name and make sure that before browsing addon domain, clear cache from your local machine. :)
     
  3. prkl

    prkl Member

    Joined:
    Sep 7, 2010
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Still redirects to main domain..
     
  4. MarcusRight

    MarcusRight Registered

    Joined:
    Sep 13, 2010
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Germany
    I had the same problem few days ago and it turns out that it was the DNS conf problem. I'm talking here about the domain DNS if you create the addon domain right after you change the DNS addresses you might end up in such situation. Just wait few hours maybe a day and delete the addon domain and create it once more then check if its working. It worked for me.
     
  5. linux7802

    linux7802 Well-Known Member

    Joined:
    Dec 14, 2007
    Messages:
    232
    Likes Received:
    1
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator

    In that case confirm your addon domain is resolving from correct server with correct document root path. If eevrything is correct then reconfigure addon domain. If you don't mind provied us your addon domain as well as main domain , so that we can check DNS record for you.
     
Loading...

Share This Page