title: TYPO3 Extbase - redirect to pid
body: <pre><code>$GLOBALS['TSFE']-&gt;pageNotFoundAndExit('');
  </code></pre>
  
  <p>is currently used, but instead I would like to redirect to a page ID.</p>
  
  <p>With the command <code>redirectToUri</code>, I could find no solution, or didn't work. </p>
  
  <p>Code:</p>
  
  <pre><code>/**
  * initialize action show
  * @return void
  */
  public function initializeShowAction() {
    if ($this-&gt;request-&gt;hasArgument('xxx')) {
      if ( $xxx=$this-&gt;xxxRepository-&gt;findByUid(
        intval($this-&gt;request-&gt;getArgument('xxx'))
      ) ) {
        $this-&gt;request-&gt;setArgument('xxx',$xxx);
        return;
      }
    }
  
  $GLOBALS['TSFE']-&gt;pageNotFoundAndExit('');
  
  }
  </code></pre>