I have a properly working Drupal 6 site, at the webroot of my server, which can be accessed by www.mysite.com or by mysite.com. I have some special html files (not part of Drupal) that can be currently accessed by going to mysite.com/special and that works fine.

I would prefer that people just go to special.mysite.com to get to the html files in that directory (instead of mysite.com/special). I just had the DNS set up so that special.mysite.com now points to the webroot, and Drupal currently handles it the same as www.mysite.com.

However, I would like it if people coming to special.mysite.com arrive at the index file within the "special" folder on mysite.com. I bet I can do something to the .htaccess file that Drupal uses in the webroot directory - but I don't know what? Any advice? Thanks a ton.

1 Answer 1


add in your .htaccess.

RewriteCond %{HTTP_HOST} ^special.mysite.com$
RewriteRule ^/?$ "http\:\/\/mysite\.com\/special" [R=301,L]
  • find in your Drupal htaccess the place to put this after RewriteEngine on. Remember that little bad changes in your .htaccess will pull down your site.
    – cigotete
    Commented Aug 11, 2011 at 22:57
  • That worked OH SO perfectly. Thanks a ton for your help. Commented Aug 12, 2011 at 13:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.