-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Question: How to redirect from old branch to new branch documentation at ReadTheDocs? #2444
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
Comments
I think this answers your question. I believe you would use From /develop/ To /master/ http://docs.readthedocs.io/en/latest/user-defined-redirects.html#prefix-redirects |
Thank you very much for the answers. I'm trying to configure such /develop/ to /master/ redirect using the prefix redirect functionality you mention. However, I'm not able to configure the destination so the outcome is
and not the one that I'd need:
See attached screenshot: |
+1 to redirecting old-branch to new-branch |
+1 |
@fgalan I think you want to go into the Versions setting and change develop (which is what I imagine is there now) to master. In our case, $version = latest |
A long time has passed since I needed this (October 2016). I'm not sure, but I don't remember that Versions settings that time. Has it been introduced recently (in the Octuber 2016 to now timeframe)? |
Well, it's there now, so either it was there and you didn't know it, or it has in fact been added since then. I don't know which. |
We also want the ability to specify redirects of the form |
@wohali My guess is that is what prefix redirect is supposed to do, but I just reported that it only has From and not To, so I'm actually not sure how it is supposed to work. |
Ah, looks like prefix redirect ONLY redirects to latest version (per response from support, which led me to this doc): https://docs.readthedocs.io/en/latest/user-defined-redirects.html I responded: Thanks, that helps. But it would be even better if I could specify where I wanted to redirect to. e.g. Maybe I have /rev4/ and want to redirect to /rev5/ . Can you add this as a feature request? |
Thanks, that helps. But it would be even better if I could specify where I wanted to redirect to. e.g. Maybe I have /rev4/ and want to redirect to /rev5/ . Can you add this as a feature request?
…-- Barbara
P.S. I also suggest you add a link to that document on the redirects page.
On Aug 9, 2018, at 10:01 AM, Santos Gallegos ***@***.*** ***@***.***>> wrote:
@barbara-sfx <https://github.com/barbara-sfx> please see https://docs.readthedocs.io/en/latest/user-defined-redirects.html <https://docs.readthedocs.io/en/latest/user-defined-redirects.html>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#2444 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AQ457lfSkenB7_JajTOXHgtAIxip63V8ks5uPGrjgaJpZM4KSUXC>.
|
I think this is a bug on our side. First of all, our UX says that a Prefix Redirect will match the Absolute path, but taking a look at the code it only consider the So, for example, if the URL is This transformation is done at this function: Example:
I hope to propose a solution for this soon. Marking as a bug. |
Hi all! This was deployed yesterday and should be working properly. You may want to create the redirects you weren't able to do it. Please, if you find any other issue open a new one :) |
(This issue comes from http://stackoverflow.com/questions/39882805/how-to-redirect-from-old-branch-to-new-branch-documentation-at-readthedocs, so I haven't just copy-pasted instead of using the suggested issue template. I hope this would be also acceptable).
We are rendering ReadTheDocs (RTD) documentation for a software project hosted at github (in particular, this one).
Recently we have changed our main branch due to internal policies. In the past we used "develop" as main branch. Now, we are unsing "master" as default branch. The "develop" branch is still in our repository, but it is not receiving new contributions (at the end, it will be deleted).
The problem is that all the links to documentation (that we have been distributing among our users during years) like this one https://fiware-orion.readthedocs.io/en/develop/user/walkthrough_apiv2/index.html will point to an obsolete piece of documentation, as now the right one is https://fiware-orion.readthedocs.io/en/master/user/walkthrough_apiv2/index.html
Does RTD have some functionality (redirect, alias, etc.) that could solve this problem? As far as I checked, RTD supports several redirection types ("Prefix redirect", "Page redirect", etc.) but after looking them all it seems they cannot do this kind of redirection (or I haven't understood how the work to do it :). I mean redirecting
to
Any idea about how to solve this problem or feasible workarounds will be highly appreciated.
The text was updated successfully, but these errors were encountered: