5

I am adding another store to an existing Magento install: main-store.com works fine and I am adding main-store.com/nested-store. (There is currently a holding page at nested-store.com, which I will redirect to main-store.com/nested-store when it is ready to go live.)

I have created a new website, store and store view in Magento for nested-store. I have created a new root category and sub categories for nested-store. I have updated the base url for the new store to be main-store.com/nested-store. All other urls use {{unsecure_base_url}}, {{unsecure_base_url}}/skin etc.

The problem I have is that the homepage of main-store.com/nested-store looks fine, but when I click on any links, e.g. main-store.com.nested-store/shop (which is my root category for this store) or main-store.com.nested-store/about, I see the 404 page for main-store.com.

I have created the category hierarchy and added lots of cms pages, all of which I cannot access at the moment. When I try to preview the about page (main-store.com/nested-store/about/?___store=nested-store), I also see the 404.

Why is the nested store linking to only pages in the main store?

4
  • Is there a reason that you have a nested store? I don't remember seeing any examples of that. I've seen a 2nd store at the same level as the first. Is your main store in the main public_html folder?
    – Dan
    Nov 4, 2013 at 15:37
  • I followed these instructions:
    – Lucy
    Nov 5, 2013 at 21:58
  • I followed these instructions: magentocommerce.com/knowledge-base/entry/… and this crucialwebhost.com/kb/how-to-setup-multiple-magento-stores. Index.php for my main store is in the main public_html folder, then my nested store is in a subfolder within that. Is there a simpler way of doing it?
    – Lucy
    Nov 5, 2013 at 22:04
  • Which method are you using in those instructions? Also are you planning to get an ssl certificate for each store? Some hosts only allow one IP per account. Your hosting provider may be able to help decide which method to use.
    – Dan
    Nov 7, 2013 at 0:34

1 Answer 1

2

My first guess is, that magento can't see, that you are surfing on your new store, instead of your old store under the category nested-store/about. Therefore the first thing you have to check is, whether magento uses the right storeview here.

If this is not the case, then you should add a vhost configuration wich sets the right website/storeview, like this:

SetEnv MAGE_RUN_CODE {storecode}
SetEnvIf Host www\.domain2\.com MAGE_RUN_CODE={storecode}

or

SetEnv MAGE_RUN_CODE {websitecode}
SetEnv MAGE_RUN_TYPE website

If this is the case, the only idea I have is to dig into the routing with xdebug or any other debugger of your choice and check what happens inside.

And a side note: Having a store in a subdirectory of another store might count as "a bad idea" :-)

Your Answer

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

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