I've read this article: http://drupal.org/node/290768 which explains multisite settings on Linux.

But I need separate .htaccess for each site. How do I do it?

1 Answer 1


You cannot have separate .htaccess files in Drupal's root directory.

You can have different rewrite condition inside your Drupal's root .htaccess file .

You can have separate .htaccess inside your sites/%mysite%/ directory which will control all the files, modules, themes, etc related to that specific site.

  • Can you please clarify? How will sites/%mysite%/.htaccess work for whole site? I mean it should only control access for that folder only.
    – AgA
    Jul 23, 2011 at 13:33
  • on a multisite setup you have sites/mysite1.com/, sites/mysite2.com, etc. You can put an .htaccess file in these directories. the .htaccess will control everything relate to that individual site.
    – iStryker
    Jul 23, 2011 at 13:50
  • 1
    No the separate .htacces isn't working. Instead I added another RewriteCond rule below the existing( in root folder) as in here: RewriteCond %{HTTP_HOST} ^maternityleaverules\.in$ [NC] RewriteRule ^(.*)$ maternityleaverules.in/$1 [L,R=301] RewriteCond %{HTTP_HOST} ^articlesdirectoryindia\.com$ [NC] RewriteRule ^(.*)$ articlesdirectoryindia.com/$1 [L,R=301]
    – AgA
    Jul 24, 2011 at 8:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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