I have setup multistores on one Magen开发者_开发知识库to installation and all the stores are on different servers. I have created symlinks for each of them. Now I want to generate sitemap.xml for each store. I have created a folder called sitemaps on my root directory, inside sitemaps I’ve created folders for each store. (i.e. store1, store2 inside sitemaps). Now I’m generating sitemap.xml inside them folders for each store. I’ve also add the following line in .htaccess of store1.com:
RewriteRule ^sitemap.xml$ http://www.mainserver.com/sitemaps/store1/sitemap.xml [NC]
(found this help here: http://www.magentocommerce.com/boards/viewthread/59388/) Now if I type www.store1.com/sitemap.xml, I should be able to see the xml for that store but I’m getting 404 Not Found error. Any ideas?
Copied from Magento stack
NOTE: I tried this way it always works.
First, create a new folder called sitemaps in the root of your website, then create subfolders for each domain.
/sitemaps/domain_1/
/sitemaps/domain_2/
Then login to the Magento admin and navigate to – catatlog -> google sitemap
Create or edit the sitemap listings for each store and set the “path to sitemap” field to be the path you created for the store.
/sitemaps/domain_1/
/sitemaps/domain_2/
Update your robots.txt file. To make sure that the search engine spiders are properly directed to the new sitemaps. You may need to update or create the robots.txt file. Edit the robots.txt file and add the following lines at the top —
# Website Sitemap
Sitemap: http://www.domain_1.com/sitemaps/domain_1/sitemap.xml
Sitemap: http://www.domain_2.com/sitemaps/domain_2/sitemap.xml
Finally, if your site uses the Apache web server engine, you should update the .htaccess file in the root of your website to direct any other sitemap requests to the proper place. Locate the following line below the line that reads — RewriteEngine on
And add the following redirect statements below it —
# Sitemap: http://www.domain_1.com/sitemaps/domain_1/sitemap.xml
RewriteCond %{HTTP_HOST} ^.*domain_1\.com$
RewriteRule ^sitemap.xml$ sitemaps/domain_1/sitemap.xml [NC,L,R=301]
# Sitemap: http://www.domain_2.com/sitemaps/domain_2/sitemap.xml
RewriteCond %{HTTP_HOST} ^.*domain_2\.com$
RewriteRule ^sitemap.xml$ sitemaps/domain_2/sitemap.xml [NC,L,R=301]
精彩评论