[FLOW3-general] Redirect seems to ignore routing
Bastian Waidelich
bastian at typo3.org
Mon Nov 19 14:19:05 CET 2012
Torben Hansen wrote:
Hi Torben
> Now I create a routing entry for this action, so I can get rid of the
> package name in the URL. My routing setup looks like this.
>
> -
> name: 'Login'
> uriPattern: 'login'
> defaults:
> '@package': 'My.Package'
> '@controller': 'Login'
> '@action': 'index'
> $this->redirect('index', 'Login', 'My.Package', array('some' => ‘param’))
Your route misses the "some" parameter in this case. It has to be
defined in the uriPattern and/or in the defaults of your route, e.g.:
-
name: 'Login'
uriPattern: 'login(/{some})'
defaults:
'@package': 'My.Package'
'@controller': 'Login'
'@action': 'index'
'some': 'SomeDefault'
Alternatively you could set the "appendExceedingArguments" option to
TRUE (see [1]) but that is rather meant to be used for fall back routes
because it might match more requests than you wish.
HTH
Bastian
[1]
http://flow.typo3.org/documentation/guide/partiii/routing.html#exceeding-arguments
More information about the FLOW3-general
mailing list