我只有一个代码库,可以在其中运行多个网站。
例如我的
http://www.example1.com/Example1
http://www.example2.com/Example2
http://www.example3.com/example3
这样,我的页面的链接在所有网站上都会有所不同。
现在的问题是,如何为此类网站创建网站地图。
说明。
我有一个Web应用程序项目,在那个Web应用程序项目上,我有多个事件现在,我可以像这样映射这些事件。
http://www.example1.com/Example1
http://www.example2.com/Example2
http://www.example3.com/example3
所以我的第一个事件有网址
http://www.example1.com/Example1/Page1
http://www.example1.com/Example1/Page2
http://www.example1.com/Example1/Page3
http://www.example1.com/Example1/Page4
第二个是:
http://www.example2.com/Example1/Page5
http://www.example2.com/Example1/Page7
http://www.example2.com/Example1/Page2
http://www.example2.com/Example1/Page6
现在,因为可以将站点地图添加到根目录,所以只能有一个站点地图。但是我有多个映射到单个IP的域。因此我如何处理具有多个域和单个IP的站点地图。或者我需要创建多个站点地图,然后我可以根据域提交它。
为4个域创建4个不同的站点地图,并将它们保存在相应域的根目录中。或者,您可以使用服务器端代码根据对/sitemap.xml的请求的域名发送正确的站点地图。
请参阅该文章:http://www.microsystools.com/products/sitemap-generator/help/multiple-domains-xml-sitemaps/