Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Addon Domain from one account redirects to a domain on another account

Discussion in 'Bind/DNS/Nameserver' started by kodyxgen, Sep 1, 2015.

  1. kodyxgen

    kodyxgen Active Member

    Joined:
    Jul 9, 2013
    Messages:
    27
    Likes Received:
    2
    Trophy Points:
    3
    cPanel Access Level:
    Root Administrator
    Hi,
    I have a strange thing going one, i created an addondomain for one of my domains, and now when i want to access that domain name i am getting redirected to https to another domain hosted on the server on another account.
    I have checked the .htaccess files for both accounts and they are ok. I don't know what is happening :(.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,400
    Likes Received:
    1,951
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello :)

    Does this only happen when accessing the addon domain name securely? Did you review the .htaccess files in both the public_html directory and the document root directory of the addon domain name?

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. kodyxgen

    kodyxgen Active Member

    Joined:
    Jul 9, 2013
    Messages:
    27
    Likes Received:
    2
    Trophy Points:
    3
    cPanel Access Level:
    Root Administrator
    Hi,
    I am not accesing the addon domain securely, but it redirects to secure https, the thing is that in the addon domain directory i dont have files, cPanel did not created any file there and it is empty. the addon domain name and it is redirecting to https and i see the contet of another domain,it is realy strange.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    #3 kodyxgen, Sep 1, 2015
    Last edited: Sep 2, 2015
  4. kodyxgen

    kodyxgen Active Member

    Joined:
    Jul 9, 2013
    Messages:
    27
    Likes Received:
    2
    Trophy Points:
    3
    cPanel Access Level:
    Root Administrator
    I managed to solve my problem, in case someone has the same problem, the thing was in the main domain .htaccess file, i was redirecting all domains to https the correct setting are.
    RewriteEngine On

    RewriteCond %{HTTPS} off
    RewriteCond %{HTTP_HOST} ^(?:www\.)?(maindomain|addondomain if it is a case)\.com$ [NC]
    RewriteRule ^ https://%1.com%{REQUEST_URI} [R=302,L,NE]
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,400
    Likes Received:
    1,951
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    I'm happy to see you were able to resolve the issue. Thank you for updating us with the outcome.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice