嵌套的Drupal网站清理url

我有一个主要的drupal7站点和一个drupal6站点,在主要的drupal7站点中“生活”。 url如下所示: example_d7.comexample_d7.com/dir/example_d6 。 这些站点中的每一个都是从一个单独的目录中提供的: /www/drupal_sites/example_d7/www/drupal_sites/example_d6 。 我已经将默认的drupal .htaccess文件的apache指令直接放在一个vhost文件中。

我的问题是,虽然干净的URL在主站点example_d7.com ,但干净的URL不能在example_d7.com/dir/example_d6example_d7.com/dir/example_d6工作。 当我追加一个index.php?q=admin的URL,我可以浏览该网站。

我已经尝试了各种重写规则和条件。 我正在运行Apache 2.2.10。

主要的drupal7网站configuration:

  <Directory /www/drupal_sites/example_d7> AllowOverride None ...snip... # Various rewrite rules. <IfModule mod_rewrite.c> RewriteEngine on RewriteRule "(^|/)\." - [F] # RewriteBase / # Pass all requests not referring directly to files in the filesystem to # index.php. Clean URLs are handled in drupal_environment_initialize(). RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !=/favicon.ico RewriteRule ^ index.php </IfModule> </Directory> 

Drupal6子网站configuration:

 Alias /dir/example_d6 /www/drupal_sites/example_d6 <Directory /www/drupal_sites/example_d6 AllowOverride None ...snip... <IfModule mod_rewrite.c> RewriteEngine on # Rewrite URLs of the form 'x' to the form 'index.php?q=x'. RewriteCond %{REQUEST_URI}/ ^/dir/example_d6 RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !=/favicon.ico RewriteRule ^(.*)$ /dir/example_d6/index.php?q=$1 [L,QSA] </IfModule> </Directory> 

我也用rewritebase指令RewriteBase /dir/example_d6无济于事。

RewriteLog结果(页面请求,没有js / css /图像)

 xxxx - - [21/Aug/2011:16:18:04 --0400] [example_d7.com/sid#8657910][rid#89a0b88/initial] (3) [perdir /] add path info postfix: /www/drupal_sites/example_d6/admin -> /www/drupal_sites/example_d6/admin/settings xxxx - - [21/Aug/2011:16:18:04 --0400] [example_d7.com/sid#8657910][rid#89a0b88/initial] (3) [perdir /] strip per-dir prefix: /www/drupal_sites/example_d6/admin/settings -> www/drupal_sites/example_d6/admin/settings xxxx - - [21/Aug/2011:16:18:04 --0400] [example_d7.com/sid#8657910][rid#89a0b88/initial] (3) [perdir /] applying pattern '^(.*)$' to uri 'www/drupal_sites/example_d6/admin/settings' xxxx - - [21/Aug/2011:16:18:04 --0400] [example_d7.com/sid#8657910][rid#89a0b88/initial] (2) [perdir /] rewrite 'www/drupal_sites/example_d6/admin/settings' -> '/dir/example_d6/index.php?q=www/drupal_sites/example_d6/admin/settings' xxxx - - [21/Aug/2011:16:18:04 --0400] [example_d7.com/sid#8657910][rid#89a0b88/initial] (3) split uri=/dir/example_d6/index.php?q=www/drupal_sites/example_d6/admin/settings -> uri=/dir/example_d6/index.php, args=q=www/drupal_sites/example_d6/admin/settings xxxx - - [21/Aug/2011:16:18:04 --0400] [example_d7.com/sid#8657910][rid#89a0b88/initial] (2) [perdir /] trying to replace prefix / with / xxxx - - [21/Aug/2011:16:18:04 --0400] [example_d7.com/sid#8657910][rid#89a0b88/initial] (1) [perdir /] internal redirect with /dir/example_d6/index.php [INTERNAL REDIRECT] 

在主站点迁移到drupal7之后,这只会停止工作。 drupal6站点也曾经是包含主站点和子站点的多站点的一部分。 令人惊讶的是,之前没有重写条件或规则。