I need a special type of redirect for a Drupal 6 website. I'm thinking that the best place to do this is in an nginx config file, but please correct me if I'm wrong. I know I can do it in a template file/module by checking $_GET['q'] and then using drupal_goto(), but I don't want to load the full bootstrap only to do a redirect.
Basically, I need to redirect www.domain.com and domain.com to subdomain.domain.com ONLY if I don't have anything after the domain part. This means that domain.com/node/3 should NOT be redirected.
I hope it makes sense and thank you in advance for your help :)