title: Router + Clean-URL's: Load new site - requiere() works but header() works not
body: <p>In my webprojekt i use Routing + Clean URL's. </p>
  
  <p>My htaccess:</p>
  
  <pre><code>RewriteEngine On
  
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule . index.php [L]
  </code></pre>
  
  <p>My index.php:</p>
  
  <pre><code>&lt;?php
  
      $projectname = "/FB-Clone2/";
      $requestAction = substr($_SERVER['REQUEST_URI'], strlen($projectname), strlen($_SERVER['REQUEST_URI']));
  
      $requestAction = explode("/", $requestAction);
  
      $root = str_replace('\\', '/', dirname(__FILE__)).'/';
      $GLOBALS['root'] = $root;
  
      switch ($requestAction[0]) {
  
          case 'login':
              //require "$GLOBALS[root]/view/login.php";
              header ("Location: $GLOBALS[root]/view/login.php");
              break;
  
  
          case 'register':
              // require "$GLOBALS[root]/view/register.php";
              header ("Location: $GLOBALS[root]/view/register.php");
              break; 
  
  
          default:
              //require "$GLOBALS[root]/view/login.php";
              header ("Location: $GLOBALS[root]/view/login.php");
              break;
      }
  
      return;
  
  
  ?&gt;
  </code></pre>
  
  <p>In the index.php in the switch-case-construct there are in each case commented out a require line and da header() line.</p>
  
  <p>My problem:
  If u use in all thre cases the requiere line then all works perfect.
  But if i use the index.php as shown above (with header() instead of requiere) then nothing works. I get no error and the site is not even loaded...</p>
  
  <p>Where is the problem?</p>