| 1 |
FAQ |
| 2 |
#### |
| 3 |
|
| 4 |
Aren't 301 redirects better? |
| 5 |
**************************** |
| 6 |
|
| 7 |
Client-side redirects with meta refresh are okay for search engines, even the most ancient browsers, and users too. |
| 8 |
|
| 9 |
|project| extension was created for tech writers who don't want or can't manage redirects with server-side 301 redirects. Generally, SEO consultants recommend server-side redirects created with ``.htaccess`` and similar files. However, many documentation is hosted as on static website hosting which doesn't support server-side redirects. |
| 10 |
|
| 11 |
I know better how to write HTML redirect file |
| 12 |
********************************************* |
| 13 |
|
| 14 |
By default, created HTML redirect files contains ``<html><head><meta http-equiv="refresh" content="0; url=${to_uri}"></head></html>``. |
| 15 |
|
| 16 |
If you want JavaScript redirection instead, wait longer, or whatever, set ``redirect_html_template`` option. This option should points to file inside source dir (directory containing ``conf.py``). For example:: |
| 17 |
|
| 18 |
redirect_html_template_file = "redirect.html.template" |
| 19 |
|
| 20 |
Actual target URI requested in configuration is available under ``${to_uri}`` placeholder. |
| 21 |
|
| 22 |
Why name "reredirects"? |
| 23 |
*********************** |
| 24 |
|
| 25 |
Because the name "redirects" is already taken by `another <https://github.com/sphinx-contrib/redirects>`_ extension. Unfortunately, it doesn't fulfil our requirements (the most notable it doesn't support wildcards and placeholders). These were reasons why we decided to bring a new extension. |