From 59a08061076bcc20a27f3d23470ced6369aad936 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Chris=20M=C3=BCller?= <typo3@krue.ml> Date: Sat, 7 Jan 2023 19:18:46 +0100 Subject: [PATCH] [DOCS] Use tabs for running commands in Composer/legacy installation in EXT:redirects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This eases the usage for administrators running a legacy installation. Resolves: #99486 Releases: main, 11.5 Change-Id: Ibf61df760cbc80543c03f499ed40d24c68af35d2 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/77225 Reviewed-by: Stefan Bürk <stefan@buerk.tech> Tested-by: core-ci <typo3@b13.com> Tested-by: Stefan Bürk <stefan@buerk.tech> --- .../redirects/Documentation/Setup/Index.rst | 84 +++++++++++++++---- 1 file changed, 69 insertions(+), 15 deletions(-) diff --git a/typo3/sysext/redirects/Documentation/Setup/Index.rst b/typo3/sysext/redirects/Documentation/Setup/Index.rst index b13d351ce70c..aa8635af64bd 100644 --- a/typo3/sysext/redirects/Documentation/Setup/Index.rst +++ b/typo3/sysext/redirects/Documentation/Setup/Index.rst @@ -21,7 +21,7 @@ each site. .. hint:: - In non Composer installations, the file is found in + In legacy installations, the file is found in :file:`typo3conf/sites/<site>/config.yaml`. The following settings apply to **automatically created redirects**. @@ -77,16 +77,38 @@ redirects under given conditions. Use `-h` to see all options: -.. code-block:: shell +.. tabs:: + + .. group-tab:: Composer-based installation + + .. code-block:: bash + + vendor/bin/typo3 redirects:cleanup -h + + .. group-tab:: Legacy installation + + .. code-block:: bash + + typo3/sysext/core/bin/typo3 redirects:cleanup -h - vendor/bin/typo3 redirects:cleanup -h **Example 1:** Remove all redirects with less than 50 hits **and** older than 30 days. -.. code-block:: shell +.. tabs:: + + .. group-tab:: Composer-based installation + + .. code-block:: bash + + vendor/bin/typo3 redirects:cleanup -c 50 -a 30 + + .. group-tab:: Legacy installation + + .. code-block:: bash + + typo3/sysext/core/bin/typo3 redirects:cleanup -c 50 -a 30 - vendor/bin/typo3 redirects:cleanup -c 50 -a 30 .. hint:: @@ -100,10 +122,22 @@ days. and with hit counter less than 100 which start with the source path `/foo/bar` and have a status code of 302 or 303. -.. code-block:: shell +.. tabs:: + + .. group-tab:: Composer-based installation + + .. code-block:: bash + + vendor/bin/typo3 redirects:cleanup --domain foo.com --domain bar.com \ + --age 90 --hitCount 100 --path "/foo/bar%" --statusCode 302 --statusCode 303 + + .. group-tab:: Legacy installation + + .. code-block:: bash + + typo3/sysext/core/bin/typo3 redirects:cleanup redirects:cleanup --domain foo.com --domain bar.com \ + --age 90 --hitCount 100 --path "/foo/bar%" --statusCode 302 --statusCode 303 - vendor/bin/typo3 redirects:cleanup --domain foo.com --domain bar.com \ - --age 90 --hitCount 100 --path "/foo/bar%" --statusCode 302 --statusCode 303 .. _redirects-checkintegrity: @@ -124,15 +158,35 @@ redirects, each redirecting to the next and looping back to the first, e.g. Example usage to check all sites: -.. code-block:: shell +.. tabs:: + + .. group-tab:: Composer-based installation + + .. code-block:: bash + + vendor/bin/typo3 redirects:checkintegrity - vendor/bin/typo3 redirects:checkintegrity + .. group-tab:: Legacy installation + + .. code-block:: bash + + typo3/sysext/core/bin/typo3 redirects:checkintegrity Check only the site mysite: -.. code-block:: shell +.. tabs:: + + .. group-tab:: Composer-based installation + + .. code-block:: bash + + vendor/bin/typo3 redirects:checkintegrity mysite + + .. group-tab:: Legacy installation + + .. code-block:: bash - vendor/bin/typo3 redirects:checkintegrity mysite + typo3/sysext/core/bin/typo3 redirects:checkintegrity mysite This will output one line per redirect conflict. The output may look like this: @@ -203,9 +257,9 @@ configuration file :file:`LocalConfiguration.php` or .. code-block:: php 'SYS' => [ - 'features' => [ - 'redirects.hitCount' => true - ], + 'features' => [ + 'redirects.hitCount' => true + ], ], This feature toggle is disabled by default, because it comes with a small performance -- GitLab