Automatically redirect to a specific version of Django Documentation
Another creative use of my Page Redirect extension for Safari !
I have been playing with Django a lot lately. Because Django has been around for a long time, there are so many articles and tutorials out there, which is great. However, when they reference Django documentation, they reference not the latest version in the documentation. Modifying the URL manually to change to a latest version or a version that you’re using, could be tiring.
What if you can automate that ? Yes, you can! You can configure Page Redirect to automatically rewrite the URL to a specific version of your choosing.
Here’s an example configucation of redirecting to version 4.2 automatically:
- Origin:
^https://docs.djangoproject.com/en/(?!4\.2).*?/(.+)
- Destination:
https://docs.djangoproject.com/en/4.2/$1
This rule will automatically rewrite, for example,
this url https://docs.djangoproject.com/en/3.1/ref/templates/builtins/#json-script
to https://docs.djangoproject.com/en/4.2/ref/templates/builtins/#json-script
Another win for productivity!