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?