0

Magento 1.9.3.10

I thought I'd done everything correctly, but something isn't working.

All I want to do is move the domain I used on a staging Magento to a Live Magento.

I created the new Website/Store View and categories in the Live Magento, enabled it and disabled the Store View in the Staging Magento.

I removed the DNS I thought I'd put in to point the domain at the Staging Magento.

I then added the domain name into the System > Config > General > Web > Un/Secure fields in the Live Magento, did a full re-index and Cache dump.

I'm getting "The web page at ****** might be temporarily down or it may have moved permanently to a new web address."

What have I missed?

  • Are you using one or multiple websites ? – PЯINCƏ Dec 6 '18 at 15:45
  • Multiple websites – Sian Dec 6 '18 at 16:03
0

You have to update the index.php and .htaccess

index.php

You add the bellow code before Mage::run($mageRunCode, $mageRunType);

/*Websites redirects*/
switch($_SERVER['HTTP_HOST']) {
    case 'yourdomaine1.com':
    case 'www.yourdomaine1.com':
        $mageRunCode = 'your_website_code_of_domaine1';
        $mageRunType = 'website';
    break;
    case 'yourdomaine2.com': 
    case 'www.yourdomaine2.com': 
        $mageRunCode = 'your_website_code_of_domaine2';
        $mageRunType = 'website';
    break;
}

.htaccess

## SetEnv MAGE_RUN_TYPE store
SetEnvIf Host yourdomaine1\.com MAGE_RUN_CODE=your_website_code_of_domaine1
SetEnvIf Host www\.yourdomaine1\.com MAGE_RUN_CODE=your_website_code_of_domaine1
SetEnvIf Host yourdomaine2\.com MAGE_RUN_CODE=your_website_code_of_domaine2
SetEnvIf Host www\.yourdomaine2\.com MAGE_RUN_CODE=your_website_code_of_domaine2

Don't forget to set the base url for each website in admin website scope, clean the cache after.

  • Thanks, I've done all that now. But sadly I'm getting a Magento 404 error: Page not found. – Sian Dec 6 '18 at 17:25
  • in which domaine ? did set all the admin config base url etc ... did your two domaines point to magento IP project ? – PЯINCƏ Dec 6 '18 at 17:29
  • tribal-mx.co.uk is the domain I am trying to move and add to the live Magento. I can't remember if I did that.. Could you briefly explain and it might jog my memory! I'm very new to magento. – Sian Dec 6 '18 at 17:36
  • I added a test file and thats showing online tribal-mx.co.uk/Testing.txt – Sian Dec 6 '18 at 17:40
  • I think your magento configuration is wrong, there are a lot of things to check, check if the website is enabled, check the general configuration, theme settings reindexall and clean the cache. if you did't find the solution, give me the credentials by email, i'll check this when I have a time. – PЯINCƏ Dec 6 '18 at 17:56
0

After a lot of digging I finally got it up and running. I ended up using the following code in the .htaccess file

## SetEnv MAGE_RUN_TYPE store ##
SetEnvIf Host .*my_domain1.* MAGE_RUN_CODE=website_code_for_my_domain1
SetEnvIf Host .*my_domain1.* MAGE_RUN_TYPE=website

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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