[TYPO3-mvc] redirect results in quite ugly url
Sebastian Fischer
typo3 at evoweb.de
Tue Feb 1 19:45:29 CET 2011
On 02/01/2011 02:10 PM, Franz Koch wrote:
> Hey guys,
>
>> perhaps it's a solution to use forward instead of redirect? It has the
>> same signature as redirect and should do the job. That prevents Extbase
>> from encoding all your information into URL as it is still present in
>> the controller context.
>
> yes, use "forward" instead of "redirect". A redirect will send a
> location header to a new URI, whereas a forward is only forwarding the
> request to another controller/action internally (URL is not changing).
> So forward is most likely what you're looking for. Forward also has the
> benefit that you don't have to mess with the request arguments, those
> are automatically passed to the forwarded action.
>
> Example:
>
> public function proxyAction($someFlag) {
> if ($someFlag === 'save') {
> $this->forward('save');
> } else {
> $this->forward('whatever');
> }
> }
>
forward() was the perfect solution.
Thanks for your advice Franz
Greetings
Sebastian
More information about the TYPO3-project-typo3v4mvc
mailing list