amp-html - 如何修复 Google AMP 缓存错误:url 中的未知路径前缀?
问题描述
根据 Google Search Console,我的网站 (thrivous.com) 有大约 170 个有效的 AMP 页面。通过将#development=1 附加到 AMP URL 直接访问它们时,它们都可以正常加载并验证。
但是,当我尝试在 Google AMP 缓存中访问它们时,我在浏览器控制台中收到以下错误消息:
“url中的未知路径前缀”
页面重定向到非缓存的 AMP 页面。
以下是浏览器控制台中的重定向和错误消息示例:
我已使用 Google AMP Cache URL API 验证我使用的是正确的 Google AMP Cache URL。它们存在。API 没有报告任何错误。
以下是 Google AMP Cache URL API 返回的信息示例:
{
"ampUrls": [
{
"originalUrl": "https://thrivous.com/blogs/views/wheres-the-real-nzt-48-limitless-pill",
"ampUrl": "https://thrivous.com/blogs/views/wheres-the-real-nzt-48-limitless-pill?view=amp",
"cdnAmpUrl": "https://thrivous-com.cdn.ampproject.org/c/s/thrivous.com/blogs/views/wheres-the-real-nzt-48-limitless-pill?view=amp"
}
]
}
我可以毫无问题地加载 originalUrl 和 ampUrl。当我尝试加载 cdnAmpUrl 时,我在浏览器控制台中得到“url 中的未知路径前缀”。然后页面重定向到 ampUrl。
这曾经工作得很好。而且,事实上,在我运行 Google AMP Cache URL API 之后,它在加载一两个页面后再次正常工作。但随后它返回给出错误消息并重定向。再次运行 API 似乎无法再次修复它。
如何永久修复此问题,以便 Google AMP 缓存在不重定向的情况下正常工作?
解决方案
推荐阅读
- stata - 如何过滤带有整数及其小数点的观测值?
- similarity - 有没有办法测量 2 个数组的模式/形状的相似性?
- expo - 使用 expo 向 IOS 和 Android 独立应用程序发布更新
- react-native - 为什么在 Redux 中存储反应导航状态不好
- java - 我真的不明白括号括起来的代码的目的
- api - 如何将应用程序连接到 Zoom?
- python - 如何更有效地根据索引将值从一个数组分配给另一个数组?
- flutter - 如果有描述数据和位置数据不可用,如何显示或隐藏尾随图标?
- arrays - 在 Julia 中构造 Array{Any} 时防止类型更改
- python - 如何在Python中组合两个列表的项目