简体   繁体   English

Jekyll/github 页面问题:没有尾部斜杠的 URL 正在加载旧的/过时版本的 github 站点

[英]Jekyll/github pages issue: URL without trailing slash is loading an old/ out-of-date version of github site

I am running into an issue with our website, which is built using github & Jekyll.我在使用 github 和 Jekyll 构建的网站上遇到了问题。 The web page that I am trying to load works WITH a trailing slash, but if you type it in to your browser WITHOUT a trailing slash, it pulls up an outdated version of the entire site.我正在尝试加载的网页使用尾部斜杠工作,但是如果您在浏览器中输入它而没有尾部斜杠,它会拉出整个网站的过时版本。 This is creating issues for our site visitors because they are getting outdated information when they look at this page.这给我们的网站访问者带来了问题,因为他们在查看此页面时会获得过时的信息。

Weirdly, it is only an issue on this one page, not on any other page on the site.奇怪的是,这只是这一页上的问题,而不是网站上任何其他页面上的问题。

outercoast.org/year (this is the url WITHOUT trailing slash is pulling up an out-of-date version- note that the top menu is also different and out of date from the rest of the site) externalcoast.org/year (这是没有尾部斜杠的网址是拉出一个过时的版本 - 请注意,顶部菜单也与网站的其余部分不同且已过时)

outercoast.org/year/ (this url WITH trailing slash is pulling up the correct version) externalcoast.org/year/ (这个带有斜杠的网址是正确的版本)

I tried some different things, like setting up a manual redirect and playing with permalink settings, but no luck.我尝试了一些不同的东西,比如设置手动重定向和使用永久链接设置,但没有运气。

Here is the repo: https://github.com/javbotero/Outer-Coast这是回购协议: https : //github.com/javbotero/Outer-Coast

Does anyone have any thoughts on how to fix this issue?有没有人对如何解决这个问题有任何想法? Thanks so much for taking a look!非常感谢您的观看!

You have two pages :你有两页:

You will have to choose one of those pages, and I think that you can delete year/index.html .您必须选择其中一个页面,我认为您可以删除year/index.html

The fact that http://outercoast.org/year returns an old version comes from your Amazon hosting. http://outercoast.org/year返回旧版本的事实来自您的亚马逊托管。 It seems that they are not invalidating cache.似乎他们没有使缓存无效。

The full http response from firefox network panel is :来自 Firefox 网络面板的完整 http 响应是:

HTTP/1.1 200 OK
x-amz-id-2: qib+GnWWIIct1mrEC/dtF/NgJeZ8dWr4yH8Nc/a+RieFAKT0VEh2h40fSMJp+IyaXiAw+rv7hbI=
x-amz-request-id: ED0E3EE0EBF5D323
Date: Sat, 25 Jan 2020 21:26:18 GMT
Last-Modified: Sat, 23 Nov 2019 01:02:04 GMT
ETag: "c8c259c6d791a7f42f264832b97dbd42"
Content-Type: 
Content-Length: 11060
Server: AmazonS3

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM