Addon domain redirects to main domain

prkl

Member
Sep 7, 2010
5
0
51
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.
 

prkl

Member
Sep 7, 2010
5
0
51
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. :)
Still redirects to main domain..
 

MarcusRight

Registered
Sep 13, 2010
1
0
51
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.
 

linux7802

Well-Known Member
Dec 14, 2007
232
1
68
cPanel Access Level
Root Administrator
Still redirects to main domain..

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.