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

kodyxgen

Active Member
Jul 9, 2013
27
2
53
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 :(.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
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.
 

kodyxgen

Active Member
Jul 9, 2013
27
2
53
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.
 
Last edited:

kodyxgen

Active Member
Jul 9, 2013
27
2
53
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]
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
I'm happy to see you were able to resolve the issue. Thank you for updating us with the outcome.