gpt4 book ai didi

xml - Google 站点地图索引 - 带参数的站点地图位置

转载 作者:塔克拉玛干 更新时间:2023-11-03 02:31:34 24 4
gpt4 key购买 nike

我即将创建一个工具来为谷歌创建动态站点地图(并生成一个动态站点地图索引页面)。

但我找不到任何关于站点地图索引中的 URL 必须如何的信息。我知道它不必以 .xml 结尾。但是站点地图索引中的站点地图位置可以像这样吗?

<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">

<sitemap>

<loc>http://www.example.com/sitemap1.xml?param1=someParameter&param2=anotherParameter</loc>

<lastmod>2004-10-01T18:23:17+00:00</lastmod>

</sitemap>

</sitemapindex>

提前致谢。

更新:我们采用了以下解决方案。

<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<sitemap>
<loc>http://myhost.com/sitemap1.xml</loc>
<lastmod>2015-01-28</lastmod>
</sitemap>
<sitemap>
<loc>http://myhost.com/sitemap2.xml</loc>
<lastmod>2015-01-29</lastmod>
</sitemap>
</sitemapindex>

Google 似乎对此非常满意。至少它有效,而且谷歌不会提示它。您可能会添加更多属性(如果它们在 sitemaps.org 架构中指定),但我不知道它会有多大的不同。

最佳答案

创建站点地图时请引用以下规则。 http://www.sitemaps.org/protocol.html

要明确回答,允许包含 URL 参数的动态 URL。不过,loc 标记中的 URL 必须采用 UTF-8 编码。

关于xml - Google 站点地图索引 - 带参数的站点地图位置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16416594/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com