1

I am trying to redirect multiple drupal sites to same code base using following htaccess file

RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www.)?site.com$ [NC]
RewriteCond %{REQUEST_URI} !^/subdirectory/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ subdirectory/$1
RewriteCond %{HTTP_HOST} ^(www.)?ngeneric.com$ [NC]
RewriteRule ^(/)?$ subdirectory/index.php [L]

It workds but, now every URL on the site has its subdirectory infront like

http://site.com/subdirectory/.....

How to fix this?

More Info: Domain is routed to public_html/a/ The drupal site in inside this a directory as public_html/a/b and I am trying to use multiple sites, so I am getting this problem.

0

Try to set the $baseurl variable in settings.php, at Drupal site directory. Read the documentation around this variable in the settings file.

| improve this answer | |
  • Yes I did try that too. No use – Starx Dec 7 '12 at 12:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.