I'm using Cpanel to create my subdomains; and I created 2 domains and I choose the document_root folder for them .. but they just redirect back to the main domain ..! subdomain.site.com >> site.com I don't know how to make subdomains work using .htaccess files ?? I used to use this method since ages .. I just don't know what's wrong ..? the question is: cpanel should be configuring a .htaccess file right ?? where can i find that file to edit my subdomains in it .. my website was under hack by a script kiddie who may was the reason for the "redirect for the main domain" problem so where I can fix my redirection thing ??
Sounds like your hosting plan don't allow addon domains but parked domains. With parked domains your new added names will redirect the the root main domain. You need to get into Cpanel, choose parked domains and then create a redirection to each subdomain.
fixed I'm using wordpress and the site url was mysite.com/myblog so wordpress uses the base url and rediredcts to it .. that's why it was redirecting to mysite.com .. so I now changed the website url in wordpress to the sub domain and I'm now up and working Thanks anyway