cancel
Showing results for 
Search instead for 
Did you mean: 

Change Admin Domain

Change Admin Domain

Hi all

I have multiple websites running on one installation (Magento 1.9.3.4) and need to move the default website to another server.

The admin is accessed by the default domain name (websiteA.com/admin) so when I move this site to another server, I will need one of the other website to become the url for the admin (websiteB.com/admin).

How do I do this please?

My multiple websites setup use the following in the index.php page

(my default websiteA is not listed below)

/* Store or website code */
$mageRunCode = isset($_SERVER['MAGE_RUN_CODE']) ? $_SERVER['MAGE_RUN_CODE'] : '';

/* Run store or run website */
$mageRunType = isset($_SERVER['MAGE_RUN_TYPE']) ? $_SERVER['MAGE_RUN_TYPE'] : 'store';

switch($_SERVER['HTTP_HOST']) {
case 'websiteB.co.uk':
case 'www.websiteB.co.uk':
Mage::run('websiteB', 'website');
break;
default:
Mage::run();
break;
case 'websiteC.co.uk':
case 'www.websiteC.co.uk':
Mage::run('websiteC', 'website');
break;
default:
Mage::run();
break;
case 'websiteD.co.uk':
case 'www.websiteD.co.uk':
Mage::run('websiteD', 'website');
break;
default:
Mage::run();
break;
}

Thank you

Andy

 

1 REPLY 1

Re: Change Admin Domain

You need to update the website URL in Default Config path i.e. you WebsiteB. Once you do that your admin will start browsing with WebsiteB/Admin. If that does not work than from Manage stores set the websiteB as default.

- Tarandeep
Problem solved?Please give 'Kudos' and accept 'Answer as Solution'.