Drupals clean-urls (.htaccess) breaks with mass vhost Apache has a nifty mass vhost feature. Problem is, when I use this to reach my site, clean-urls stop working. Is there a way to combine this with clean urls?

&lt;Directory /var/www/localhost/htdocs&gt;
  Order allow,deny
  Allow from all
  AllowOverride
&lt;/Directory&gt;
UseCanonicalName Off
LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon
CustomLog /tmp/access_log vcommon
VirtualDocumentRoot /var/www/localhost/htdocs/%0/web
VirtualScriptAlias /var/www/localhost/htdocs/%0/web


Obviously I've attempted to add

RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]


to the &lt;Directory/&gt;, but that doesn't help.
I had to add a slash before index.php to get this working for WordPress. Has to do with VirtualDocumentRoot not setting the DocumentRoot to the same value I guess.

RewriteRule ^(.*)$ /index.php?q=$1 [L,QSA]