0

My goal here is to create one splash page for only the two with the same domain. This page would link to each website (website2.com/store1, website2.com/store2).

Using Magento, I have 3 websites with 2 under the same domain name:

website1.com website2.com/store1 website2.com/store2

I have created 2 directories in root with new .htaccess and index.php respectively for each website and are both working properly, but when change the DirectorIndex index.php in root .htaccess but it changes the main page for all three sites. I have tried only updating the htaccess for website2.com, but it redirects back to website1.com.

I have tried adding another file, test.html, after index.php and updated my RewriteRule with this test.html but this doesn't seem to be working. I am not sure what I'm missing to get this working properly.

How can I set up htaccess and/or index.php so when I first go to website2.com that you see this splash page, but doesn't effect website1.com.

UPDATE I am able to create a splash page and set it under the default index file, but it redirects for all 3 sites. I just want it to redirect when you first land on website2.com, not website1.com

1

You are I think over complicating things - Magento does this out of the box. A better way to do this setup is to have the store code appear in URL's. Having subdirectories can introduce issues that are not always overly simple to resolve so my recommendation is actually never to do this. Using the store code the end result will be exactly the same but it will keep everything more easily maintainable.

Just set the relevant store codes to store1 and store2 under system->manage stores and then go to system->configuration->web->url options and change add store code to urls to yes.

As for having the per store splash page, create the relevant content inside a CMS page for each relevant store and select the right store view. Once you have done that go to system->configuration->web->default pages. Select each relevant store in turn in the configuration scope and then set the relevant CMS page under cms home page.

Finally remove the sub directories you have created as you won't need them anymore. Now when navigating to website2.com/store1 and website2.com/store2 you will see the relevant CMS splash pages.

Note that with this approach the store code will also appear in URL's for website1.com as the setting only has global scope. Never the less it is still the best and cleanest option for what you are trying to achieve.

| improve this answer | |
  • The reason I created multiple stores is because I need to manage products and settings separately, when I had both stores under one website it would add products to the cart in both store views. I also could update settings per store view. What I would like to do is have have a very basic page (no footer, header, etc.) and have two images as links to each store. – Mindi.Stone Nov 9 '14 at 17:38
  • Ok, well in that case you can alter the layout for the relevant CMS pages. When editing the page set the layout XML to remove parts of the page you don't need i.e <remove name="left" /> would remove the left column, <remove name="header" /> would remove the header, <remove name="footer" /> the footer etc. You can just remove the relevant areas of the page you don't need so you literally just have the cms content render. – Jonathan Hussey Nov 9 '14 at 22:28

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.