1

In TYPO3 Version 9.5.11 I would like to have my own URL rewritten with GET parameters. The URL looks like this:

https://www.website.com/my-page/?logintype=login&dc=1246dh4bd6&code=0b61330b65a94&state=&uniquekey=5151c41e377&login_id=1969743080&dc_timestamp=1574418836

At the end, the URL should be:

https://www.website.de/my-page/dc/

Yes, I don't need all the GET-Parameters and I want to remove it.

Now I use routeEnhancers in my config.yaml file.

The setting looks like this to rewrite the url in the first step like this:

https://www.website.de/my-page/logintype/dc/code/state/uniquekey/login_id/dc_timestamp

My routeEnhancers:

routeEnhancers:
   MyCustomRewrite:
     type: Simple
     routePath: '{logintype}/{dc}/{code}/{state}/{uniquekey}/{login_id}/{dc_timestamp}'
     requirements:
       logintype: '. *'
       dc: '. *'
       code: '. *'
       state: '. *'
       uniquekey: '. *'
       login_id: '. *'
       dc_timestamp: '. *'

However, the rewrite does not work. What could be the problem?

Oliver Hader
  • 4,093
  • 1
  • 25
  • 47
Martin
  • 83
  • 3
  • 16
  • 1
    Did you try with passing default value? check out here: https://docs.typo3.org/c/typo3/cms-core/master/en-us/Changelog/9.5/Feature-86365-RoutingEnhancersAndAspects.html#simple-enhancer – Geee Nov 25 '19 at 04:57
  • 1
    The requirement regular expression above has a space character - means "one character followed by 0-x spaces". Try removing `requirements` section in case it does not define any requirements. – Oliver Hader Dec 26 '19 at 18:14

0 Answers0