多个 sitemaps.xml ,多个网站但单个主机
现在: 我有一个网站池,它是通过在 IIS 中的单个主机上使用不同的 css 和实现,以 ASP classic 和 vbscript 开发的。
他们的 sitemap.xml 彼此不同,例如
http://www.mysite1.com/sitemap-mysite1.xml
http://www.mysite2.com/sitemap-mysite2.xml
http://www.mysite3.com/sitemap-mysite3.xml
但所有 xml 文件都放在一个主机 http://www.mysite1.com/
代码>
如何设置这些网站的站点地图? robots.txt 对这个解决方案有帮助吗?如果是的话,如果我输入像
sitemap:http://www.mysite1.com/sitemap-mysite1.xml 这样的条目,我不会出现问题 站点地图:http://www.mysite2.com/sitemap-mysite2.xml 站点地图:http://www.mysite3.com/sitemap-mysite3.xml
搜索引擎机器人如何区分这些站点地图...?
currently:
i have a pool of website which is developed in asp classic and vbscript by using different css and implementation on a single host in IIS .
their sitemap.xml is different from each other e.g.
http://www.mysite1.com/sitemap-mysite1.xml
http://www.mysite2.com/sitemap-mysite2.xml
http://www.mysite3.com/sitemap-mysite3.xml
but all the xml files place in one host http://www.mysite1.com/
how to set sitemaps of these sites ?? does robots.txt would help in this solution ?? if yes than wouldnt i give problem if i put entries like
sitemap:http://www.mysite1.com/sitemap-mysite1.xml
sitemap:http://www.mysite2.com/sitemap-mysite2.xml
sitemap:http://www.mysite3.com/sitemap-mysite3.xml
how search engine bot would differentiate in between these sitemaps ... ??
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您使用什么版本的 IIS?如果是IIS7并且启用了URLRewrite,那么您可以根据传入的HTTP_HOST编写一些重写规则。
上面的代码会将 http://www.mysite1.com/sitemap.xml 重写为 http://www.mysite1.com/sitemap-mysite1.xml 等,尽管如果您是在没有 URLRewrite 的旧版本 IIS 上,它不会执行任何操作。
What version of IIS are you using? If it's IIS7 and it has URLRewrite enabled, then you could write some rewrite rules based on the incoming HTTP_HOST.
The above would rewrite http://www.mysite1.com/sitemap.xml to http://www.mysite1.com/sitemap-mysite1.xml etc. although if you're on an older version of IIS that doesn't have URLRewrite it won't do anything.
您只需将每个站点地图放入每个站点的根目录中即可。所以 .../public_html/site1/sitemap.xml 搜索引擎会找到它。
You just put each sitemap in the root of each site. So .../public_html/site1/sitemap.xml and the search engines will find it.