Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign up"This page has moved" shouldn't have status code 200 #760
Comments
This comment has been minimized.
This comment has been minimized.
|
My understanding was that the way I did it was supposed to be "similar to a redirect", so I assumed it gave the right code :( |
This comment has been minimized.
This comment has been minimized.
|
I have no idea what the right thing to do here is, or how to implement that right thing. I'd love help! |
carols10cents
added
Online only
E-help-wanted
labels
Jun 13, 2017
This comment has been minimized.
This comment has been minimized.
hschmidt
commented
Jun 20, 2017
|
A 301 would affect search engines and human visitors alike, effectively making the 1st edition unreachable to both. Since both editions should coexist while the 2nd edition is being written, redirecting from 1st to second edition now would be the wrong thing to do. Once the 2nd edition has been released, all current links pointing to the 1st edition should result in a 301 to the appropriate page in the 2nd edition. The 1st edition should be archived by moving it to a new location, optionally with a robots.txt rule to prevent search engines from crawling it. |
This comment has been minimized.
This comment has been minimized.
To be clear, this bug isn't about removing the first edition; it's about the old first edition URLs pointing to the location of the first edition as it stands today. |
This comment has been minimized.
This comment has been minimized.
Gedweb
commented
Jun 20, 2017
|
If look documentation of some other project - several versions of documentation live with version prefix. Just leave old version on his place or redirect with 301 status code to new location. |
This comment has been minimized.
This comment has been minimized.
Gedweb
commented
Jun 23, 2017
|
Let's play a game Some progress on this issue? Have a suggest? |
This comment has been minimized.
This comment has been minimized.
hschmidt
commented
Jun 23, 2017
Gotcha. I was not aware of the fact that 1st edition pages changed URLs. In that case, a simple 301 from old URL to new URL is the way to go. So following the example from the OP, a request to https://doc.rust-lang.org/book/ownership.html should return a 301 response with a https://doc.rust-lang.org/book/first-edition/ownership.html I would need to know more about where/how doc.rust-lang.org is hosted to make a recommendation on how to do that. |
This comment has been minimized.
This comment has been minimized.
|
Soooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo re-reading this issue, I feel dumb. Let me back up a second. I have done two recent things with redirects:
I have conflated these two in my brain, so my first reply here was thinking about 2, when this issue was about 1. For 2, we did this https://github.com/rust-lang/book/blob/gh-pages/index.html#L7 We could do this for 1 as well. |
This comment has been minimized.
This comment has been minimized.
Gedweb
commented
Jun 23, 2017
•
|
Nope, server redirection required. Search engines not execute JS. I VERY RECOMMEND return back first edition, we lose position in search results. A huge numbers of links now wrong (stackoverflow, reddit, blogs..) |
This comment has been minimized.
This comment has been minimized.
Agreed. Clearly the best approach when there is an obvious new target. |
This comment has been minimized.
This comment has been minimized.
This is not really true, but it's also not here nor there. |
This comment has been minimized.
This comment has been minimized.
Gedweb
commented
Jun 23, 2017
|
@steveklabnik believe first link in google, don't look down. 2015 year, Carl! @ScottAbbey, hotfix or rollback — no time to discuss. Solve problem and release again with second edition. Page with choice is rashly solution. |
This comment has been minimized.
This comment has been minimized.
Gedweb
commented
Jun 24, 2017
|
So, simple solution — just add rule for http-server. Ready to help if required, but please do something. |
This comment has been minimized.
This comment has been minimized.
|
@Gedweb there is no controllable http-server; this is an s3 bucket. |
This comment has been minimized.
This comment has been minimized.
Gedweb
commented
Jun 27, 2017
|
@steveklabnik, so.. maybe replace it to ec2. Using static website is old problematic way, but without direct access to http-server just a pain. And how i see, s3 allow using redirect with an configuration file, like that |
This comment has been minimized.
This comment has been minimized.
|
The documentation does go through nginx so could have dedicated rules for all the old links. Edit: that nginx server's config should really be in a public repo because it is gnarly and if we lost it we would cry heavy tears. |
This comment has been minimized.
This comment has been minimized.
dlight
commented
Jul 22, 2017
|
If the concern is that people will miss later editions when checking a link from the first edition, one could simply put a note on top of every first edition chapter with the same contents as the disambiguation message, with a "x" to close, and make the browser remember you closed it. That way, new book editions would still be discoverable even after doing a 301 redirect ("moved permanently"). |
This comment has been minimized.
This comment has been minimized.
Gedweb
commented
Jul 24, 2017
|
In primary we can see version selector on a page. Looks, here an example of correctly documentation site. I want pick your attention on url path when toggle version. So, if we have broken links and can't repair (now it's not required - too late) we need create solution which can avoid this problem in future. |
This comment has been minimized.
This comment has been minimized.
dlight
commented
Jul 25, 2017
|
That would be cool, even though there isn't a 1:1 correspondence between chapters of different book versions (they can be merged, splitted, etc). That way, someone reading about a subject on the first book could jump to roughly the right place on the second. |
This comment has been minimized.
This comment has been minimized.
Gedweb
commented
Nov 11, 2017
•
|
Still was nothing happened. Second edition incomplete and have alert, links to the first edition broken. |
steveklabnik
added
the
second-edition
label
Apr 3, 2018
This comment has been minimized.
This comment has been minimized.
damoasda
commented
Dec 23, 2018
|
I was also wondering why Google links to Rust documentation pages with no content. If I google for "rust ownership" as mentioned in the original post by @mistydemeo, the first result links to a "second edition", but the page has no content except a warning and links to other versions. To get an overview of the currently existing versions I tried to collect all versions for "rust ownership":
I suggest the following:
What do you think? |
mistydemeo commentedJun 10, 2017
Google and other search engines are still serving search results from the first edition of the book; for example, this link was the first result for "rust ownership". I noticed that they're being served up with a status code of 200 - should this be 301 or 410 to let them be purged from the index and replaced with a current URL?