You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* `@stsewd <https://github.com/stsewd>`__: Analytics: Don't use full_path in get_or_create (`#9099 <https://github.com/readthedocs/readthedocs.org/pull/9099>`__)
8
+
* `@humitos <https://github.com/humitos>`__: Build: do not upload `build.tool` to production S3 (`#9098 <https://github.com/readthedocs/readthedocs.org/pull/9098>`__)
Copy file name to clipboardExpand all lines: docs/user/user-defined-redirects.rst
+19-24Lines changed: 19 additions & 24 deletions
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
User-defined Redirects
2
2
======================
3
3
4
-
You can set up redirects for a project in your project dashboard's Redirects page.
4
+
You can set up redirects for a project in your project dashboard's :guilabel:`Redirects` page.
5
5
6
6
Quick Summary
7
7
-------------
@@ -16,14 +16,21 @@ Quick Summary
16
16
17
17
Your redirects will be effective immediately.
18
18
19
-
.. note::
19
+
Limitations
20
+
~~~~~~~~~~~
21
+
22
+
Redirects are only implemented in case of a *404 File Not Found* error.
23
+
If you need to redirect a large number of files that still exist,
24
+
please reach out to :doc:`/support`.
20
25
21
-
For the time being, redirects are only implemented in case of a
22
-
*404 File Not Found* error.
26
+
Page & Exact Redirects can redirect to URLs outside Read the Docs.
27
+
Define the `To URL` as the absolute URL you want to redirect to.
23
28
24
29
Redirect Types
25
30
--------------
26
31
32
+
We offer a few different type of redirects based on what you want to do.
33
+
27
34
Prefix Redirects
28
35
~~~~~~~~~~~~~~~~
29
36
@@ -50,12 +57,10 @@ Your users query would now redirect in the following manner::
50
57
51
58
Where ``en`` and ``latest`` are the default language and version values for your project.
52
59
53
-
54
60
.. note::
55
61
56
-
In other words, a *Prefix Redirect* removes a prefix from the original URL.
57
-
This prefix is removed from the rest of the URL's ``path`` after ``/$lang/$version``.
58
-
For example, if the URL is ``/es/1.0/guides/tutorial/install.html`` the "From URL's prefix" will be removed from ``/guides/tutorial/install.html`` part.
62
+
If you were hosting your docs without a prefix, you can create a ``/`` Prefix Redirect,
63
+
which will prepend ``/$lang/$version/`` to all incoming URLs.
59
64
60
65
61
66
Page Redirects
@@ -73,23 +78,18 @@ You would set the following configuration::
73
78
From URL: /example.html
74
79
To URL: /examples/intro.html
75
80
76
-
Note that the ``/`` at the start doesn't count the ``/$lang/$version`` prefix (e.g.
77
-
``/en/latest``), but just the user-controlled section of the URL.
81
+
**Page Redirects apply to all versions of you documentation.**
82
+
Because of this,
83
+
the ``/`` at the start of the ``From URL`` doesn't include the ``/$lang/$version`` prefix (e.g.
84
+
``/en/latest``), but just the version-specific part of the URL.
78
85
If you want to set directs only for some languages or some versions, you should use
79
86
:ref:`user-defined-redirects:exact redirects` with the fully-specified path.
80
87
81
-
.. tip::
82
-
83
-
*Page Redirects* can redirect URLs **outside** Read the Docs platform
84
-
just by defining the "To URL" as the absolute URL you want to redirect to.
85
-
86
-
87
88
Exact Redirects
88
89
~~~~~~~~~~~~~~~
89
90
90
-
If you're redirecting from an old host AND you aren't maintaining old paths for your
91
-
documents, a Prefix Redirect won't suffice and you'll need to create *Exact Redirects*
92
-
to redirect from a specific URL, to a specific page.
91
+
*Exact Redirects* are for redirecting a single URL,
92
+
and take into account the full URL (including language & version).
93
93
94
94
Say you're moving ``docs.example.com`` to Read the Docs and want to redirect traffic
95
95
from an old page at ``https://docs.example.com/dev/install.html`` to a new URL
@@ -128,11 +128,6 @@ Similarly, if you maintain several branches of your documentation (e.g. ``3.0``
128
128
``latest``) and decide to move pages in ``latest`` but not the older branches, you can use
129
129
*Exact Redirects* to do so.
130
130
131
-
.. tip::
132
-
133
-
*Exact Redirects* can redirect URLs **outside** Read the Docs platform
134
-
just by defining the "To URL" as the absolute URL you want to redirect to.
0 commit comments