I have a sub directory multisite setup on a sub domain. (locally with mamp everything is running fine), but on my live server, i can only reach the first (home) page of the multisite site, and when going anywhere (q?=user/login), i get directed to the default site.

site is dev.mysite.com/www.example.com

i have softlink in the drupal root - www.example.com -> ./

in sites.php i have

$sites = array('dev.mysite.com.www.example.com' => 'example.com',);

and of course the structure is sites/example.com

nothing like a cookie address in the settings... i dont know what else could be wrong. Using the same htaccess, the default, that was working locally for me.

i did notice something interesting that could be a clue. I have a logo image embedded in the page template. (img src="<?php print base_path().path_to_theme(); ?>/img/logo.png")

so locally the source prints as:

img src="/www.mysite.com/sites/example.com/themes/example/img/logo.png"

and on the server it looks like

img src="http://dev.mysite.com/www.example.com/sites/example.com/themes/example/logo.png"

  • i have softlink in the drupal root - Then you're doing Drupal multisite wrong. Could you clarify what you're trying to accomplish? For most simple mulitisite set-ups, editing sites.php isn't even necessary, and if you're symlinking than you're almost certainly doing it wrong. Dec 5, 2013 at 19:38
  • im trying to run a site under dev.mysite.com/www.example.com (because im just develop a site for example.com, so i dont have the domain name). In other words, "www.example.com" could just as well be "coolsiteone".
    – petergus
    Dec 6, 2013 at 11:53
  • Can you create a new subdomain? Dec 6, 2013 at 16:13
  • the sub domain is an apache site directive pointing to the directory with the drupal core root. (so yes, i can make another sub domain, and of course point it where i want on my server).
    – petergus
    Dec 6, 2013 at 16:26
  • Okay, then why not just create a new subdomain which uses the same web root as dev.mysite.com? You should be able to do a standard Drupal multisite from there without any symlinking. Dec 6, 2013 at 16:48

2 Answers 2


Any caching turned on? (varnish/memcache/...)

If using memcache make sure to separate the memory buckets in each site's config.

$conf['memcache_key_prefix'] = 'Example_Memcached_Key';
  • If these are modules then no. And i cleared the cache with devel before exporting the database.
    – petergus
    Dec 6, 2013 at 11:54

Incase someone happens upon this... This was a case of mod_rewrite not being enabled on the new server. :D

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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