Multisite installation (subdirectory url)

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
valovag's picture

I have two existing live sites running drupal 7 (site1.com/en and site2.com/en --> /en automatically selected for english language) and I want to unite them with subdirectory urls with seperate databases. I am following Drupal documentation for installing multi-site#subdirectory. In order to make the symbolic link I need to have ssh access to the server to run the commands. But my hosting service informed me that I am not allowed to remote access. Does anyone know if there is any alternative?

Thanks for the help!

Up to this point the steps I followed:
1. From parallels plesk I created a new database db2 inside site1 and run a backup script of site2's database.
2. Using ftp I copied /site2/httpdocs/en/sites/default folder to /site1/httpdocs/en/sites/site1.com.en.site2.
4. Inside site1.com.en.site2 folder I have the default.settings.php & setting.php site2 was using. I granted user & group write permissions. I changed settings.php to contain the new db2 information. base url was not specified in the original file (the one site2 was using) so I didn't make any changes.
5. With the copy of site2's folder I brought the original files folder
6. Inside the folder I created empty folders modules, themes & tmp.


I requested ssh access from my host and finally could run the commands.
so I made a symlink using:
ln -s /var/www/vhosts/site1.com/httpdocs/en /var/www/vhosts/site1/httpdocs/en/sites/site1.com.en.site2

I added to .htaccess the lines:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteCond %{REQUEST_URI} ^/site2
RewriteRule ^ site2/index.php [L]

right before
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule ^ index.php [L]

And nothing happened. I still get a 404 page not found error

Anyone? any ideas?

Comments

htaccess was not needed.

valovag's picture

htaccess was not needed. running:
ln -s . site2
from root directory did the work. Now site2's content appears in url site1.com/en/site2 but with the header, footer and banners of site1. where can we determine from which folder to load these elements?

Multisite

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: