I've got plenty of ideas from google and stackoverflow- but none of them of individuals was precisely what i'm searching for. here's scenario-

  1. I've purchased a hosting space from the provider. I needed to give a domain title(let abc.com) because the primary domain of this hosting space.

  2. Then i've discovered that i must invest the contents for your rimary domain(abc.com) in to the document root directly. that's no directory like www/abc or www/abc.com.

  3. I Quickly researched and located plenty of .htaccess solution. I selected the next one-

    RewriteEngine On

    RewriteBase /

    RewriteCond % abc.com

    RewriteCond % !^/abc.com/(.*) [NC]

    RewriteRule ^(.*)$ /abc.com/$1

  4. I've just paste above lines in the finish from the existing .htaccess file (default). It had been working fine. I've been using www/abc.com directory for my abc.com domain from then.

  5. Lately I've added some subdomains (let abc.abc.com) to my abc.com domain. But it's acting strange beside me. all subdomains are searching for its contents from abc.com/subdomain (eg. abc.com/abc.abc.com)

  6. This time around i get no solution over google (i might skipped it).

Someone assist me to please- i'm in bad shape.

EDITED: Following lines were in WebRoot .htaccess right from the start. Next I've added additional lines as pointed out above(3,4)

# -FrontPage-

IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*

<Limit GET POST>
order deny,allow
deny from all
allow from all
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>
AuthName abc.com
AuthUserFile /home/abc/public_html/_vti_pvt/service.pwd
AuthGroupFile /home/abc/public_html/_vti_pvt/service.grp\

EDITED AGAIN: You will find another domain names(except the primary domain abc.com) within the same hosting space. Individuals domain names possess some working sub-domain names. But sub-domain of primary domain isn't being employed as i described above.

Change

RewriteCond %{HTTP_HOST} abc.com

to

RewriteCond %{HTTP_HOST} ^abc.com$

The rules don't suit your subdomains any longer.

Update

# catch www.abc.com and abc.com (and wwwwwwwwwww.abc.com)
RewriteCond %{HTTP_HOST} ^(w+\.)?abc\.com$