@@ -3,28 +3,30 @@ User-defined Redirects
3
3
4
4
You can set up redirects for a project in your project dashboard's :guilabel: `Redirects ` page.
5
5
6
+ .. contents :: Table of contents
7
+ :local:
8
+
6
9
Quick Summary
7
10
-------------
8
11
9
- * Log into your readthedocs.org account.
10
- * From your dashboard, select the project on which you wish to add redirects.
11
- * From the project's top navigation bar, select the :guilabel: `Admin ` tab.
12
+ * Go to the :guilabel: `Admin ` tab of your project.
12
13
* From the left navigation menu, select :guilabel: `Redirects `.
13
- * In the form box "Redirect Type" select the type of redirect you want. See below for detail.
14
- * Depending on the redirect type you select, enter FROM and/or TO URL as needed.
14
+ * In the form box "Redirect Type" select the type of redirect you want.
15
+ :ref: `See below <user-defined-redirects:redirect types >` for detail.
16
+ * Depending on the redirect type you select, enter ``From URL `` and/or ``To URL `` as needed.
15
17
* When finished, click the :guilabel: `Add ` button.
16
18
17
19
Your redirects will be effective immediately.
18
20
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 `.
21
+ Features
22
+ --------
25
23
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.
24
+ - By default, redirects are followed only if the requested page doesn't exist
25
+ (*404 File Not Found * error), if you need to apply a redirect for files that exist,
26
+ mark the :guilabel: `Force redirect ` option.
27
+ - :ref: `user-defined-redirects:page redirects ` and :ref: `user-defined-redirects:exact redirects `
28
+ can redirect to URLs outside Read the Docs,
29
+ just include the protocol in ``To URL ``, e.g ``https://example.com ``.
28
30
29
31
Redirect Types
30
32
--------------
@@ -82,7 +84,7 @@ You would set the following configuration::
82
84
Because of this,
83
85
the ``/ `` at the start of the ``From URL `` doesn't include the ``/$lang/$version `` prefix (e.g.
84
86
``/en/latest ``), but just the version-specific part of the URL.
85
- If you want to set directs only for some languages or some versions, you should use
87
+ If you want to set redirects only for some languages or some versions, you should use
86
88
:ref: `user-defined-redirects:exact redirects ` with the fully-specified path.
87
89
88
90
Exact Redirects
@@ -128,6 +130,17 @@ Similarly, if you maintain several branches of your documentation (e.g. ``3.0``
128
130
``latest ``) and decide to move pages in ``latest `` but not the older branches, you can use
129
131
*Exact Redirects * to do so.
130
132
133
+ You can use an exact redirect to migrate your documentation to another domain,
134
+ for example::
135
+
136
+ Type: Exact Redirect
137
+ From URL: /$rest
138
+ To URL: https://newdocs.example.com/
139
+ Force Redirect: True
140
+
141
+ Then all pages will redirect to the new domain, for example
142
+ ``https://docs.example.com/en/latest/install.html `` will redirect to
143
+ ``https://newdocs.example.com/en/latest/install.html ``.
131
144
132
145
Sphinx Redirects
133
146
~~~~~~~~~~~~~~~~
0 commit comments