Django 站点地图生成 https ://in loc TWICE in Development

标签 django https schema sitemap lines-of-code

example.com/sitemap.xml 返回带有双 https://的 loc,使得生成的站点地图不正确/ Not Acceptable 。

<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml">
<url>
<loc>https://https://example.com</loc>
<changefreq>monthly</changefreq>
<priority>1.0</priority>
</url>

我尝试将 sitemaps.py 文件中的协议(protocol)从 https 更改为 http,但仅在 https://example.com/ 前面附加 http://.

有什么想法吗?

最佳答案

我的解决方案:

我进入管理面板并重命名了该网站。这次前面没有协议(protocol)。

关于Django 站点地图生成 https ://in loc TWICE in Development,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/75184767/

相关文章:

java - 尝试将架构应用于 JSON 数据时,SPARK 数据帧返回 null

python-3.x - 具有自定义用户模型的 Django-cms : LookupError: Model 'accounts.CustomUser' not registered

html不导入css文件

python - Django 和 MVC(MVT) 布局

mysql - 管理 runserver - 加载 MySQLdb 模块时出错

javascript - 确定用于加载 javascript 的协议(protocol)

node.js - React - 仅在 HTTPS 上发送 POST 请求时出现网络错误

html - 您可以强制 HTML 表单对相对 URL 使用 HTTPS 吗?

json - 在 json 模式中使用 "$ref"时出现 MalformedURLException

mongodb - MongoDB中的多语言属性