Hi all..
I've registered multiple domains for sites with non-related content. However, to save some $ on hosting costs, I planned to just pay for hosting on one domain, and redirect the other three to subdirectories on the hosted domain. so for example the content of domain_b.com is actually hosted in domain_a.com/domain_b but I need the address of the domain_b content so say domain_b.com

My hosting service has a simple "redirect" feature, but its a frame redirect, so its causing problems with search engine indexing.

I've looked around and found some info on this forum, other forums, and from my hosting service.. but something's wrong and I'm not sure where the problem might be.. so this is what I've done:
  1. create a CNAME for domain_b so www.domain_b.com refers to domain_b.domain_a.com
  2. create a subdomain in domain_a so domain_b.domain_a.com refers to domain_a.com
  3. enable the following rewrite script on domain_a:
    Code:
    RULE_1_START:
    insensitive match IN:Host into % with ^domain_a
    if matched then goto END
    RULE_1_END:
    
    RULE_2_START:
    insensitive match IN:Host into % with ^(.*).domain_a(.*)
    if matched then match URL into $ with ^/(.*)
    if not matched then goto RULE_2_END
    set URL = /%1/$1
    RULE_2_END:
  4. add "RewriteEngine on" to my .htaccess file
  5. create a subfolder 'domain_b' on 'domain_a'


the idea being that the cname on 'b' will refer to the subdomain on 'a' which will be rewritten to the subfolder.

But.. its not working, even if I ignore domain_b for the moment and just try to access domain_b.domain_a.com I get an "error 400 bad request".

some other info:
  • my hosting service runs zeus.
  • the rewrite script has been added in the html config page offered by my hosting service.. (is it possible to do in .htaccess? should I try that?)
  • the hosting service is netregistry if that helps
  • the hosting service does not have plexus (whatever that is?)


So any thoughts? Thanks in advance for reading...