-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Redirects don't work if the url includes /projects/foo
#7552
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
Hi! Thanks for your report. The The code that produces this is at readthedocs.org/readthedocs/proxito/views/decorators.py Lines 42 to 46 in 2d64328
That decorator is executed immediately when the page is tried to be served and the redirects code is not hit at all because the decorator fails: readthedocs.org/readthedocs/proxito/views/serve.py Lines 72 to 79 in 2d64328
I'm afraid that this is a current limitation about how redirects with
This redirect works because
(note that |
Thanks a lot @humitos for the detailed analysis! I see - I was trying to use the redirect in order to work around #7487 (i.e. to fix the broken links in the search results on This particular use case will go away once #7487 is fixed, but there is another use case that will remain: if a subproject moves away from a parent project, it would be very useful to be able to still redirect requests to a different documentation site - thanks for accepting this as a feature request. |
/projects/foo
This is only available in the new implementation. Closes #7552
This is only available in the new implementation. Closes #7552
Details
It seems that in exact redirects the $rest keyword is treated "verbatim" rather than as the placeholder it is intended to be.
The documentation on exact redirects explains
So, I tried setting up the following redirect on the
aiida-core
RTD project:Expected Result
All requests of the form
https://aiida-core.readthedocs.io/projects/abc
should be redirected to
https://aiida.readthedocs.io/projects/abc
Actual Result
Only the "verbatim" request
https://aiida-core.readthedocs.io/projects/$rest
is redirected to
https://aiida.readthedocs.io/projects/
The text was updated successfully, but these errors were encountered: