Separate RewriteRules

Make the file more readable by separating RewriteRules and make
the version number specific rewrite rule match only if a slash follows
directly after the number (avoids false positives).

See https://forge.typo3.org/issues/50631