如何在ASP中制作.xml站点地图

如何在ASP中制作.xml站点地图,xml,web,asp-classic,sitemap,Xml,Web,Asp Classic,Sitemap,我有一个本地新闻网站,我想通过谷歌、Yandex和其他网站更快地建立索引。SEO大师们说,最简单的方法就是向搜索引擎发送网站地图。我使用的脚本太旧了,它是用ASP编写的。我有一个.asp扩展名的站点地图,但谷歌正在将.xml优先提供给其他人。那么,如何将.asp扩展名转换为.xml呢? 谢谢。您可以使用sitemapindex并将您的站点地图添加到其中。像这样: <sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9

我有一个本地新闻网站,我想通过谷歌、Yandex和其他网站更快地建立索引。SEO大师们说,最简单的方法就是向搜索引擎发送网站地图。我使用的脚本太旧了,它是用ASP编写的。我有一个.asp扩展名的站点地图,但谷歌正在将.xml优先提供给其他人。那么,如何将.asp扩展名转换为.xml呢?
谢谢。

您可以使用sitemapindex并将您的站点地图添加到其中。像这样:

<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<sitemap>
<loc>https://www.yoursite.com/sitemap/ss.aspx</loc>
<lastmod>2020-05-03T17:07:27+00:00</lastmod>
</sitemap>
<sitemap>
<loc>https://www.yoursite.com/sitemap/videos.html</loc>
<lastmod>2020-05-03T17:07:27+00:00</lastmod>
</sitemap>
</sitemapindex>

https://www.yoursite.com/sitemap/ss.aspx
2020-05-03T17:07:27+00:00
https://www.yoursite.com/sitemap/videos.html
2020-05-03T17:07:27+00:00

将站点地图索引引入搜索引擎

您可以使用sitemapindex并将您的站点地图添加到该索引中。像这样:

<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<sitemap>
<loc>https://www.yoursite.com/sitemap/ss.aspx</loc>
<lastmod>2020-05-03T17:07:27+00:00</lastmod>
</sitemap>
<sitemap>
<loc>https://www.yoursite.com/sitemap/videos.html</loc>
<lastmod>2020-05-03T17:07:27+00:00</lastmod>
</sitemap>
</sitemapindex>

https://www.yoursite.com/sitemap/ss.aspx
2020-05-03T17:07:27+00:00
https://www.yoursite.com/sitemap/videos.html
2020-05-03T17:07:27+00:00

将站点地图索引引入搜索引擎

您需要创建url重写规则。查看以了解如何使用IIS管理器创建重写规则,这将是一个良好的开端。您需要创建url重写规则。了解如何使用IIS管理器创建重写规则,这将是一个良好的开端。