Per site htaccess with multisite In short: Can I have a separate .htaccess file per site on a multi-site installation?

I've read quite a lot of conflicting stuff about this, including some which suggests you can put a .htaccess file in the site folder (i.e. /sites/www.site1.com/). However, some commenters seem to be saying this won't work.

As I am moving several non-Drupal sites over to a single multisite there will need to be lots of rewrites for old URLs, so this is pretty much essential for me.

Thanks,
Chris
Multisite logic (picking what site is what) works in Drupal itself, rather than the Apache level.

I do not think that putting a .htaccess in the sites folder would work, mainly because nothing is really fetched from there from Apache's perspective, except for files.  Normal URLs would never see that file.  There would also be some weirdness with the RewriteBase, and other complications because of the way .htaccess gets processed up the directory hierarchy.

My suggestion would be to use the Redirect module.  This module essentially presents a UI for making and managing redirects for your Drupal site.  You can enable this per site in your multisite setup.  Therefore each domain could redirect its own URLs.  I have found this module very useful for new site launches that use a new URL scheme.

Your other option would be to RewriteCond, eg

RewriteCond %{HTTP_HOST} ^www\.example\.com [NC]
RewriteRule some/old/url.html the/new/url [L,R=301]


I would do this as an include from the main Apache configuration, rather than .htaccess, unless you a really careful about backing this up when you update core.

Of the two options, I would use the Redirect module.  I would also think very carefully about committing to a multisite solution.  They tend to create more problems than they solve.