I basically want to create a new store front in magento and have a different domain linking to it in magento using the same products.

I am using site1.co.uk etc just as an example.

I have created a new Store (site2) in magento and its own Store Front using the main stores root category.

I created an alias domain in Plesk Panel (site2.co.uk) pointing to the domain of the current magento site (site1.co.uk). I also tried a normal domain with its hosting root set to the same as the site1.co.uk root directory. The alias domain I set up in Plesk 12 has the "Redirect with the HTTP 301 code" setting diabled.

I then added the following to my main magentos .htaccess just above "RewriteEngine on"

SetEnvIf Host www\.**site2**\.co.uk MAGE_RUN_CODE=**site2**
SetEnvIf Host www\.**site2**\.co.uk MAGE_RUN_TYPE=website
SetEnvIf Host ^**site2**\.co.uk MAGE_RUN_CODE=**site2**
SetEnvIf Host ^**site2**\.co.uk MAGE_RUN_TYPE=website

However when I visit the new websites URL it takes me to the maintenance page of the current site (keeping the new URL in the bar not forwarding to the main store) and I am stumpted as to why this is happenening.

Any help is greatly appreciated and if I have missed out any info let me know

2 Answers 2

  1. Make sure maintenance mode is shut off

  2. Refresh your cache, you can do this from the CLI at your site root

    • rm -rf var/cache/*
    • php shell/cache.php --refresh all
  3. There is a good reference for making new stores in a Magento Multi-Store setup

Sorry, I cannot ask for clarification on your questions, I do not have enough Rep, I also cannot cite more reference links because of rep

  • Hi JoeyH thanks for the reply, there is no maintenance.flag and the main site is working fine. Tried flushing the cache to no avail and have followed that link before I came on here. Any other suggestions are appreciated. Commented Jan 9, 2015 at 17:05
  • Can you double check what your website code is in manage stores? Make sure it matches your htaccess (MAGE_RUN_CODE)
    – JoeyH
    Commented Jan 9, 2015 at 17:12
  • I have checked the store and store front codes and tried both in the .htaccess with no luck! Commented Jan 9, 2015 at 17:13
  • Running out of options, but I would try and comment the following code in index.php and see if you can force it off: if (!file_exists($mageFilename)) { if (is_dir('downloader')) { header("Location: downloader"); } else { echo $mageFilename." was not found"; } exit; } if (file_exists($maintenanceFile)) { include_once dirname(FILE) . '/errors/503.php'; exit; }
    – JoeyH
    Commented Jan 9, 2015 at 17:27

The issue was that in the .htaccess I posted above I had it set to "website" once I changed this to "store" it worked perfectly!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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