Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redirect from /questions/{questionId} #277

Closed
zgrmrts opened this issue Nov 14, 2022 · 4 comments
Closed

Redirect from /questions/{questionId} #277

zgrmrts opened this issue Nov 14, 2022 · 4 comments
Assignees

Comments

@zgrmrts
Copy link

zgrmrts commented Nov 14, 2022

In stackoverflow, for example https://stackoverflow.com/questions/1642028 redirects to https://stackoverflow.com/questions/1642028/what-is-the-operator-in-c by adding human readable string at the end of the URL. However, in the sotoki image, it doesn't. If it were to work as in SO, it will make access to a question and its' answer easier in the offline version once you find it online, you just copy the question ID. Since sotoki's search is not as good as google or SO's search, I find it easier to do the search online, and access the solution in the offline version.

@rgaudin
Copy link
Member

rgaudin commented Nov 14, 2022

Thank you,

We only write redirects for answers, reusing the /a/{answerId} pattern used on SO. I see now that SO advertises a Share button that uses a /a/{answerId}/{yourUserId}. Not sure if it has always been the case but we can't make those full shortcuts work in the ZIM obviously.

So what's missing now is the /questions/{questionId} redirect. It's a good feature, we'll add it.

@rgaudin rgaudin changed the title Resource ID only URL's don't resolve Redirect from /questions/{questionId} Nov 14, 2022
@zgrmrts
Copy link
Author

zgrmrts commented Nov 14, 2022

/question/{questionId} seems to be addressed in issue #38 but;

  1. It is question rather than questions
  2. /a/{answerId} works but neither of /answer/{answerId}, /q/{questionId}, /question/{questionId} or /questions/{questionId} work.

@rgaudin rgaudin changed the title Redirect from /questions/{questionId} Redirect from /question/{questionId} Nov 14, 2022
@rgaudin
Copy link
Member

rgaudin commented Nov 14, 2022

Scraper was rewritten after #38 so it's content is not valid anymore. Sorry about that.

Thanks for noticing the typo ; changed it. Unfortunately, given the number of posts is in the dozens of millions and the fact that this is static we have to create individual redirects for each variation. You are proposing 5 different ones.

While there is value in supporting all of them, I don't think it's worth the cost.

So I suggest we keep /a/{answerId} and add /question/{questionId} for now. Maybe we should be more explicit about those redirects. We can surely add a paragraph in about page. That won't hurt. But to be really useful, we'd need to maybe add something to post pages. Not sure what that would be exactly.

@zgrmrts
Copy link
Author

zgrmrts commented Nov 14, 2022

Actually /questions/ was the correct one (i.e used in SO). I just wanted to note that it is written as /question/ in the issue #38 because maybe it was a typo there.
/q/ is also used as a shortcut, but /answer/ or /answers/ is not really supported by SO either.
Thanks.

@rgaudin rgaudin changed the title Redirect from /question/{questionId} Redirect from /questions/{questionId} Nov 14, 2022
@rgaudin rgaudin self-assigned this Nov 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants