-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Permanent redirects #5104
Comments
I suppose that this is a 302 on purpose, because otherwise we will exposing a redirect that could be dangerous for the user if they make a mistake. I would not change this and expose the users to this problem. What's your current problem with the 302 that makes you need a 301? |
No real problem but I argue that it is semantically incorrect.
|
Ah, it's obvious but missing on the above list... If you send temporary redirects to search engine crawlers they won't update their index. Thus, they will forever keep the old URLs (-> more load on your infrastructure). |
I think a 302 is the best choice. If you make a mistake with a 301 redirect, there isn't a good way to reverse that change. Chrome and Firefox cache 301s until the user manually clears their cache so a mistake is essentially permanent for users who don't manually clear their cache. I don't like to present users with choices where they can make nearly permanent mistakes. |
I appreciate your feedback and I understand you have a slightly different perspective. If you allowed us to edit a redirect rule (currently I can only add or remove) then you could simply add a "permanent yes/no" checkbox. That way we could tune our rules until everything works as expected - a which point we could enable the flag. |
That's fair. I would consider it as an option but the default should be 302. |
We do have a I think we could accept a PR that:
Then, we can handle special cases like this one manually (instead of building a whole UX/UI) initially. |
@humitos I'm a bit confused about the second point. As one |
@saadmk11 each |
Details
Expected Result
The exact redirect configured as
/en/latest/en/$rest -> /en/latest/
should redirect from https://nodemcu.readthedocs.io/en/latest/en/sdcard/ to https://nodemcu.readthedocs.io/en/latest/sdcard/ using HTTP 301 or 308.Actual Result
HTTP 302, temporary redirect (ignore the discussion whether to use HTTP 302 or 303 or 307 for temporary redirects for now). I would assume that users rewriting URLs in the RTD context mean to do that with "permanent redirect" in mind.
The text was updated successfully, but these errors were encountered: