From 8781a57faa01686a253abc0ff2899a1462c9fb2a Mon Sep 17 00:00:00 2001 From: Lina Wolf <112@linawolf.de> Date: Sun, 17 Nov 2024 12:44:16 +0100 Subject: [PATCH] [DOCS] Define permalinks in redirects manual Resolves: #105614 Releases: main, 13.4, 12.4 Change-Id: I517fed5389aac3c4a851c22b8a0ec35bffc96223 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/86951 Tested-by: Garvin Hicking Reviewed-by: Garvin Hicking Tested-by: core-ci --- .../redirects/Documentation/Basics/Index.rst | 17 ++++++++-------- .../Documentation/BestPractices/Index.rst | 8 +++++--- .../redirects/Documentation/Events/Index.rst | 8 +++++++- .../Documentation/Installation/Index.rst | 6 ++++++ .../Documentation/Introduction/Index.rst | 6 ++++++ .../Documentation/KnownProblems/Index.rst | 6 +++++- .../redirects/Documentation/Setup/Index.rst | 17 +++++++++++----- .../redirects/Documentation/Sitemap.rst | 2 ++ .../redirects/Documentation/Usage/Index.rst | 20 ++++++++++++++++++- 9 files changed, 71 insertions(+), 19 deletions(-) diff --git a/typo3/sysext/redirects/Documentation/Basics/Index.rst b/typo3/sysext/redirects/Documentation/Basics/Index.rst index 1febe23b4ee6..d58032ce583e 100644 --- a/typo3/sysext/redirects/Documentation/Basics/Index.rst +++ b/typo3/sysext/redirects/Documentation/Basics/Index.rst @@ -1,7 +1,7 @@ .. include:: /Includes.rst.txt -.. _glossary: -.. _basics: +.. _glossary: +.. _basics: ====== Basics @@ -13,6 +13,8 @@ specific to EXT:redirects. .. todo: add term for t3:// URI (e.g. typo3 URI, linkhandler URI, etc.) after term is clarified .. see https://forge.typo3.org/issues/95820 +.. _basics-url: + Components of a URL =================== @@ -30,7 +32,7 @@ of the URL: - query parameters - fragment -.. _http-status-codes: +.. _http-status-codes: HTTP status codes ================= @@ -87,7 +89,7 @@ that the URL has changed permanently and that they should update their index accordingly. Thus, from SEO point of view, permanent redirects are often a good choice. If domains are changed or sites restructured, 301 are often used. -.. _redirect-chain: +.. _redirect-chain: Redirect chain ============== @@ -101,7 +103,7 @@ Examples for redirect chains: - `/a => /b => /c` (it would be more efficient if `/a` redirected to `/c` directly and `/b` redirected to `/c`) -.. _redirect-loop: +.. _redirect-loop: Redirect loop ============= @@ -115,6 +117,8 @@ Examples for redirect loops: - `/a => /a` (source and target for a redirect resolve to the same URL) - `/a => /b => /a` +.. _slug: + Slug ==== @@ -126,6 +130,3 @@ enhancers and decorators. Example: A slug `/path` is used, the final URL may be `https://example.org/en/path.html`. - - - diff --git a/typo3/sysext/redirects/Documentation/BestPractices/Index.rst b/typo3/sysext/redirects/Documentation/BestPractices/Index.rst index bee30a176f2a..da7b87008cca 100644 --- a/typo3/sysext/redirects/Documentation/BestPractices/Index.rst +++ b/typo3/sysext/redirects/Documentation/BestPractices/Index.rst @@ -1,6 +1,6 @@ .. include:: /Includes.rst.txt -.. _best-practices: +.. _best-practices: ============== Best practices @@ -26,7 +26,7 @@ Here are some general tips for managing redirects: become inefficient. A "redirect chain" are several redirects which must be followed until the destination is reached. Ideally, these should be merged. -.. _best-practices-editors: +.. _best-practices-editors: Editors ======= @@ -45,7 +45,7 @@ possibility to only grant advanced editor groups access to parts of the content so that pages with changing slugs are still accessible but a better strategy is to only change slugs when absolutely necessary. -.. _best-practices-performance: +.. _best-practices-performance: Performance =========== @@ -73,6 +73,8 @@ The following rules of thumb should be followed: It is recommended to monitor performance and - if necessary - export redirects to your webserver configuration or load balancer. +.. _best-practices-troubleshooting-tools: + Troubleshooting tools ===================== diff --git a/typo3/sysext/redirects/Documentation/Events/Index.rst b/typo3/sysext/redirects/Documentation/Events/Index.rst index 86320bf6d80f..14da9ae324f8 100644 --- a/typo3/sysext/redirects/Documentation/Events/Index.rst +++ b/typo3/sysext/redirects/Documentation/Events/Index.rst @@ -1,6 +1,6 @@ .. include:: /Includes.rst.txt -.. _psr14events: +.. _psr14events: ============= PSR-14 events @@ -8,6 +8,7 @@ PSR-14 events The following PSR-14 events are available to extend the functionality: +.. _AfterAutoCreateRedirectHasBeenPersistedEvent: AfterAutoCreateRedirectHasBeenPersistedEvent ============================================ @@ -15,6 +16,7 @@ AfterAutoCreateRedirectHasBeenPersistedEvent React on persisted auto-created redirects. :ref:`More details ` +.. _BeforeRedirectMatchDomainEvent: BeforeRedirectMatchDomainEvent ============================== @@ -23,6 +25,7 @@ Implement a custom redirect matching upon the loaded redirects or return a matched redirect record from other sources. :ref:`More details ` +.. _ModifyAutoCreateRedirectRecordBeforePersistingEvent: ModifyAutoCreateRedirectRecordBeforePersistingEvent =================================================== @@ -30,6 +33,7 @@ ModifyAutoCreateRedirectRecordBeforePersistingEvent Modify the redirect record before it is persisted to the database. :ref:`More details ` +.. _ModifyRedirectManagementControllerViewDataEvent: ModifyRedirectManagementControllerViewDataEvent =============================================== @@ -38,6 +42,7 @@ Modify or enrich view data for the :php:`\TYPO3\CMS\Redirects\Controller\ManagementController`. :ref:`More details ` +.. _RedirectWasHitEvent: RedirectWasHitEvent =================== @@ -45,6 +50,7 @@ RedirectWasHitEvent Process the matched redirect further and adjust the PSR-7 response. :ref:`More details ` +.. _SlugRedirectChangeItemCreatedEvent: SlugRedirectChangeItemCreatedEvent ================================== diff --git a/typo3/sysext/redirects/Documentation/Installation/Index.rst b/typo3/sysext/redirects/Documentation/Installation/Index.rst index 17e83c20e14a..4ce7a78a704d 100644 --- a/typo3/sysext/redirects/Documentation/Installation/Index.rst +++ b/typo3/sysext/redirects/Documentation/Installation/Index.rst @@ -1,5 +1,7 @@ .. include:: /Includes.rst.txt +.. _installation: + ============ Installation ============ @@ -9,6 +11,8 @@ This extension is part of the TYPO3 Core, but not installed by default. .. contents:: Table of contents :local: +.. _installation-composer: + Installation with Composer ========================== @@ -33,6 +37,8 @@ the extension: The given version depends on the version of the TYPO3 Core you are using. +.. _installation-non-composer: + Installation without Composer ============================= diff --git a/typo3/sysext/redirects/Documentation/Introduction/Index.rst b/typo3/sysext/redirects/Documentation/Introduction/Index.rst index 215c321b3f1d..56c59040491e 100644 --- a/typo3/sysext/redirects/Documentation/Introduction/Index.rst +++ b/typo3/sysext/redirects/Documentation/Introduction/Index.rst @@ -1,5 +1,7 @@ .. include:: /Includes.rst.txt +.. _introduction: + ============ Introduction ============ @@ -29,6 +31,8 @@ For more technical information on how redirects work, visit For more information about the types of redirects, see :ref:`HTTP status codes ` +.. _introduction-what: + What does it do? ================ @@ -49,6 +53,8 @@ Features: URL*" (`pages.doktype=3`), "*Shortcut*" (`pages.doktype=4`) or redirects created within the web server (e.g. :file:`.htaccess` or web server configuration). +.. _conventions: + Conventions =========== diff --git a/typo3/sysext/redirects/Documentation/KnownProblems/Index.rst b/typo3/sysext/redirects/Documentation/KnownProblems/Index.rst index f7210b9cd273..70db8b06941a 100644 --- a/typo3/sysext/redirects/Documentation/KnownProblems/Index.rst +++ b/typo3/sysext/redirects/Documentation/KnownProblems/Index.rst @@ -1,10 +1,12 @@ .. include:: /Includes.rst.txt +.. _known-problems: + ============== Known problems ============== -.. _usagePitfallsConstants: +.. _usagePitfallsConstants: Problem with constants in LinkHandler TSConfig ============================================== @@ -13,6 +15,8 @@ It is important, that the `storagePid` is hard coded in the LinkHandler Page TSConfig, because using constants, e.g. from the site configuration, won't work here. :ref:`More details ` +.. _known-problems-other: + Other known problems ==================== diff --git a/typo3/sysext/redirects/Documentation/Setup/Index.rst b/typo3/sysext/redirects/Documentation/Setup/Index.rst index 1790b7e1a965..77b79ebe914b 100644 --- a/typo3/sysext/redirects/Documentation/Setup/Index.rst +++ b/typo3/sysext/redirects/Documentation/Setup/Index.rst @@ -1,5 +1,7 @@ .. include:: /Includes.rst.txt +.. _setup: + ===== Setup ===== @@ -10,7 +12,7 @@ the settings and commands outlined in this page. Depending on your site and how editing is handled, changes in the configuration and regular maintenance may be required. -.. _site-configuration: +.. _site-configuration: Site configuration ================== @@ -61,6 +63,8 @@ redirects. This can be adjusted via TCA The `settings` in the site configuration are generally explained in "TYPO3 Explained" > :ref:`t3coreapi:sitehandling-settings`. +.. _console-commands: + Console commands ================ @@ -72,7 +76,7 @@ Please see the general information about this in "TYPO3 Explained" > We explain executing the commands from the command line here, it is recommended to automate regular execution, e.g. via cron. -.. _redirects-cleanup: +.. _redirects-cleanup: redirects:cleanup ----------------- @@ -144,7 +148,7 @@ and have a status code of 302 or 303. --age 90 --hitCount 100 --path "/foo/bar%" --statusCode 302 --statusCode 303 -.. _redirects-checkintegrity: +.. _redirects-checkintegrity: redirects:checkintegrity ------------------------ @@ -203,7 +207,7 @@ this: You can now search for the affected redirects in the redirects module, e.g. by filtering with *Source Path* `/test-1`. -.. _editor-permission: +.. _editor-permission: Configure editor permission =========================== @@ -247,7 +251,7 @@ group in the :guilabel:`Access Lists` tab > :guilabel:`Allowed excludefields` > Allowed excludefields -.. _hit-counter: +.. _hit-counter: Hit counter =========== @@ -276,6 +280,9 @@ hit counter, a delete policy for unnecessary redirects can be defined. Visit the :ref:`redirects:cleanup ` with the option `-c` for more information. + +.. _system-reports: + System reports ============== diff --git a/typo3/sysext/redirects/Documentation/Sitemap.rst b/typo3/sysext/redirects/Documentation/Sitemap.rst index 09d3c6f56e97..c809724b0ba1 100644 --- a/typo3/sysext/redirects/Documentation/Sitemap.rst +++ b/typo3/sysext/redirects/Documentation/Sitemap.rst @@ -2,6 +2,8 @@ .. include:: /Includes.rst.txt +.. _sitemap: + ======= Sitemap ======= diff --git a/typo3/sysext/redirects/Documentation/Usage/Index.rst b/typo3/sysext/redirects/Documentation/Usage/Index.rst index 81f46575d4ee..42e5d7ff7573 100644 --- a/typo3/sysext/redirects/Documentation/Usage/Index.rst +++ b/typo3/sysext/redirects/Documentation/Usage/Index.rst @@ -1,9 +1,12 @@ .. include:: /Includes.rst.txt +.. _usage: + ===== Usage ===== +.. _usage-redirects-module: Redirects module ================ @@ -16,6 +19,8 @@ Access the redirects module in the TYPO3 backend under :guilabel:`Site Managemen Open Redirects module +.. _usage-redirects-module-list: + List ---- @@ -54,6 +59,8 @@ It is also possible to **filter**, e.g. by the *Source Path*, *Status Code*, (see Information on :ref:`Hit counter ` which must be explicitly enabled via Feature Toggle). +.. _usage-redirects-module-edit-form: + Edit form --------- @@ -81,6 +88,7 @@ and *Target* are enabled, the rest are exclude fields and must be enabled in the backend group permissions, see :ref:`backend user configuration `. +.. _usage-redirects-module-edit-form-general-tab: General tab ~~~~~~~~~~~ @@ -189,6 +197,7 @@ General tab automatically when the slug of a page is changed and those that are created in the backend module by editors. +.. _usage-redirects-module-edit-form-statistic-tab: Statistics tab ~~~~~~~~~~~~~~ @@ -229,6 +238,8 @@ the hit counter for a specific redirect and also see read-only statistics. When was this redirect created? +.. _usage-redirects-module-edit-form-access-tab: + Access tab ~~~~~~~~~~ @@ -252,6 +263,8 @@ Access tab If this is not empty, "now" (current time) must be before Stop time for the redirect to have effect. +.. _usage-redirects-module-edit-form-notes-tab: + Notes ~~~~~ @@ -263,11 +276,13 @@ Notes displayed in the "Record information" info box above the edit form. -.. _regex-examples: +.. _regex-examples: Regex examples -------------- +.. _regex-examples-regex: + Example 1: Source path with regular expression and capturing group ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -287,6 +302,7 @@ with the following result: | :samp:`https://example.org/path/something` | :samp:`https://example.org/newpath/something` | +--------------------------------------------+-----------------------------------------------+ +.. _regex-examples-regex-relative: Example 2: Source path with regular expression, capturing group and relative target ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -316,6 +332,8 @@ Using a relative target is necessary if a redirect must work on multiple domains redirects enclosed in delimiters. Use tools like https://regex101.com/, if necessary. +.. _automatic-redirect-creation: + Automatic redirects creation ============================