Posts

Showing posts from June, 2017

Drupal 7 Multisites Migration: Different Domains to Same IP address No host file

Image
Background: The site is running Drupal 7.  User wants to have a UAT sites for that, but they don't want to change their host file because it is troublesome. So I make some key-points on how to do it and I want to share it here. Let's begin. .htaccess file: Make sure you .htaccess file DID NOT have any rewrite rules that redirect user to particular sites.  In my case my .htaccess file have these line: I need to comment it out in order to make things work.  Pay attention to that. settings.php As you can see, under htdocs folder, I have 1 sub-directory for this Drupal 7 site.  And within this Drupal 7 site, I have 3 sites.  So when a user goes to: subdomain1.domain.com subdomain2.domain.com subdomain3.domain.com They will be redirected to different folders. * I did not set $base_url in settings.php (this is commented) * Make sure in your settings.php $databases var, set the 'prefix' value in your array.   Reference here . * Yes I DID NOT se