Feature #102365
openRegular expression with page id target
0%
Description
When using a regular expression where the end of the url should be added to the target url, it is only possible via target external url but not with page id and adding $1 to the url.
E.g. the example here https://docs.typo3.org/c/typo3/cms-redirects/main/en-us/Usage/Index.html has target https://example.org/newpath/$1 but it would be great to have a target url like t3://page?uid=196/$1.
Updated by Stefan Bürk 10 months ago
- Assignee set to Stefan Bürk
t3://page?uid=196/$1
does not make much sense - adding a "path" after starging with query arguments is not valid url syntax at all.
Please provide a full description of your redirect record created with all fields, at best using the TYPO3
monorepo along with the `ext:styleguide` - which can be used than to create a test first before trying to
change the implementation.
On the other hand, it would make clear what you want to pass to the target.
Additional, please mention TYPO3 version(s) ;)
Updated by Bernhard Eckl 10 months ago · Edited
What I mean is the following:
In nginx it would be:
rewrite ^/foo/(.*)$ https://domain.tld/bar/$1 permanent;
If the user calls an url like
https://domain.tld/foo/anotherdirectory
it would redirect to
https://domain.tld/bar/anotherdirectory
But I would like to redirect via TYPO3 because somebody could change the slug of the target page.
E.g.:
- Source path: /foo/(.*)$
- Target: t3://page?uid=196/$1
(page id 196 has slug called bar)
In other words: add a part of the source path to the target path but also use a page id in the target path.
Is it now more clean what I mean?
TYPO3 version: 11.5.33