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 from one account redirects to a domain on another account

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

  1. kodyxgen

    kodyxgen Member

    Joined:
    Jul 9, 2013
    Messages:
    20
    Likes Received:
    1
    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 :(.
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    654
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    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.
     
  3. kodyxgen

    kodyxgen Member

    Joined:
    Jul 9, 2013
    Messages:
    20
    Likes Received:
    1
    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.
     
    #3 kodyxgen, Sep 1, 2015
    Last edited: Sep 2, 2015
  4. kodyxgen

    kodyxgen Member

    Joined:
    Jul 9, 2013
    Messages:
    20
    Likes Received:
    1
    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]
     
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    654
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page