Hi,
I have a Drupal multisite setup and I am trying to make the Clean URLs work but cannot seem to be able to write the conditions and rules properly. I have found many answers but none of them worked.
My .htaccess file is being read without problem and the rules are being used (I tried setting the rewrite rule to the full address but it was only giving me the home page and I couldn't go anywhere else).
Here is how it is setup:
DEV:
URL1 www.site1.domain.fr/dev
URL2 www.site2.site1.domain.fr/dev
PROD
URL1 www.site1.domain.fr
URL2 www.site2.site1.domain.fr
On the server:
/dev (one drupal install)
/prod (another drupal install but same content)
My multisite is setup as this:
/sites/site1.domain.fr
/sites/site1.site1.domain.fr
(same thing for dev and for prod)
Inside sites.php
$sites = array(
'www.site1.domain.fr' => 'site1.domain.fr',
'www.site2.site1.domain.fr' => 'site2.site1.domain.fr',
)
I tried this:
RewriteCond %{HTTP_HOST} ^site1\.domain\.fr [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ site1.domain/index.php?q=$1 [L,QSA]
RewriteCond %{HTTP_HOST} ^site2.site1\.domain\.fr [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ site2.site1.domain/index.php?q=$1 [L,QSA]