Review main Merged

71422[BUGFIX] Ensure subfolder backend routing work for Apache

Stefan Bürk CR +2 V +2 Easy +0 −4 updated 10/05/21, 10:56

Commit message

With #93048 url rewrites for backend links have been introduced,
which required additional rewrite rules in the root htaccess.

The used rewrite rules for Apache route to the frontend end
index.php for installations in subfolders, thus breaking
backend usage.

This patch change the needed rewrite rule to route correctly
to the backend index.php for backend links. Correct rule is
placed in the root-htaccess template and the webserver
configuration write service is adjusted to address this for
old configs too. Furthermore the breaking rst file is adjusted
to point out the correct needed rewrite rule.

The RewriteCond statement is removed as the condition
is fully covered by the RewriteRule itself.

Review

  • Code review CR +2 Done
    • Oliver Hader +2
    • Benjamin Franzke +1
  • Verified V +2 Done
    • Oliver Hader +2
    • Benjamin Franzke +1
    • core-ci +1 CI

Issues 3

Files 4

Review log 1114

  1. Stefan Bürk uploaded patch set 1 10/04/21, 05:54

  2. core-ci voted on patch set 1 V +1 10/04/21, 06:09 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/17529

  3. Stefan Bürk updated the commit message in patch set 2 10/04/21, 10:56

  4. core-ci voted on patch set 2 V +1 10/04/21, 11:14 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/17548

  5. Benni Mack commented on patch set 2 10/04/21, 13:21

    root-htaccess:316

    Doesn't this break frontend pages that are named like '/products/cms/typo3/` ?
  6. Stefan Bürk commented on patch set 2 10/04/21, 13:55

    root-htaccess:316 Reply

    That line can be ommited, as it is a duplicate in the RewriteRule. But in the current state it routes backend routes (login etc) to the frontend index.php, if Typo3 is installed in a subfolder. Even without that line frontend/backend works. Having that duplicate check in there (for what ever reason as I could not find the reason for that line) and to be nearly equalant it should be checked against $0 (holding the path from starting from current folder) So, without and with checking agaist $0 frontend and backend works.
  7. Stefan Bürk commented on patch set 2 10/04/21, 14:19

    root-htaccess:316 Reply

    Maybe Oliver Bartsch can say something about that ? I have done a lot of tests, even checking rewrite log etc. Without the line it works the same as with it (docroot) but breaks subfolder, my replacement works for subfolder too, leaving frontend with typo3 somewhere nested intact. That was the reason I provided a working solution for both. Maybe the solution is to drop it ?
  8. Stefan Bürk commented on patch set 2 10/05/21, 06:56

    root-htaccess:316 Reply

  9. Benjamin Franzke uploaded patch set 3 10/05/21, 10:38

  10. Benjamin Franzke commented on patch set 3 10/05/21, 10:38

    root-htaccess:316 Reply

    > That line can be ommited, as it is a duplicate in the RewriteRule. true, done > Doesn't this break frontend pages that are named like '/products/cms/typo3/` ? No, as the regex (and RewriteCond) regex starts with ^.
  11. Oliver Hader voted on patch set 3 CR -1 10/05/21, 10:52

  12. core-ci voted on patch set 3 V +1 10/05/21, 10:53 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/17606

  13. Oliver Hader voted on patch set 3 V +2 CR +2 10/05/21, 10:56

  14. Oliver Hader merged patch set 4 10/05/21, 10:56