I have a main drupal7 site and a drupal6 site that "lives" within the main drupal7 site. The urls look like this: example_d7.com and example_d7.com/dir/example_d6. Each of these sites are served out of a separate directory: /www/drupal_sites/example_d7 and /www/drupal_sites/example_d6. I have placed apache directives from the default drupal .htaccess files directly in a vhost file.
My problem is that while clean urls work on the main site, example_d7.com, clean urls do not work at example_d7.com/dir/example_d6. The front page of example_d7.com/dir/example_d6 works. When I append a index.php?q=admin to the url, I can navigate the site.
I have tried a variety of rewrite rules and conditions. I am running apache 2.2.10.
Main drupal7 site 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 subsite 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>
I have also used the rewritebase directive RewriteBase /dir/example_d6 to no avail.
RewriteLog results (page request, no js/css/images)
x.x.x.x - - [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
x.x.x.x - - [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
x.x.x.x - - [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'
x.x.x.x - - [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'
x.x.x.x - - [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
x.x.x.x - - [21/Aug/2011:16:18:04 --0400] [example_d7.com/sid#8657910][rid#89a0b88/initial] (2) [perdir /] trying to replace prefix / with /
x.x.x.x - - [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]
This only stopped working after a migration of the main site to drupal7. The drupal6 site also used to be part of a multisite containing the main and subsites. Surprisingly, there no rewrite conditions or rules before.
/dir/example_d6/index.php?q=www/drupal_sites/example_d6/admin/settings? – quanta Aug 22 '11 at 2:20