cancel
Showing results for 
Search instead for 
Did you mean: 

Two installations in subdirectories

Two installations in subdirectories

Hi!
I have two installations/databases of Magento CE 1.9x on different subdirectories:
- website1 and subdir1
- website9 and subdir2

Website1 actually has multistore www.website1.com, www.website2.com, www.website3.com, www.website4.com.
Website9 Magento is quite different and needs to be separated from first installation.

Currently there is index.php in htdocs/ and htdocs/subdir1/ that directs website1 installation Magento sites successfully to right place. Probably beacuse of this:
switch($_SERVER['HTTP_HOST']) {
case 'website1.com':
case 'www.website1.com':
$mageRunCode = 'website1_com';
$mageRunType = 'website';
break;
case 'website2.com':
case 'www.website2.com':
$mageRunCode = 'website2_com';
$mageRunType = 'website';
break;
case 'website3.com':
case 'www.website3.com':
$mageRunCode = 'website3_com';
$mageRunType = 'website';
break;


Now I am wondering how I get also second installation (www.website9.com) visible for users. Ideal would be that subfolders will not be showing at URL bar - when I enter website3.com then it changes to www.website3.com/subdir1/
My website1 settings are:
- secure/unsecure urls look like http://www.websiteX.com/subfolder1/,
- Use Web Server Rewrites = No,
- Auto-redirect to Base URL = Yes (302 found) (it probably affects only homepage)

.htaccess files in htdocs/ and htdocs/subdir1/ and htdocs/subdir2/ are not modified (I am familiar with that part configurations).