title: URL redirection wont work always?
body: <p>Im Workin on a Webapplication in PHP with CodeIgniter, and im stuck :P
  Its very difficult to explain, so i show it with an example.</p>
  
  <p>I have normal CodeIgniter Controller. In this Controller i have a function like this:</p>
  
  <pre><code>&lt;?php
  public function groups($subdomain ='') {
  
      $this-&gt;load-&gt;library('MyLogin');
      $user_id = $this-&gt;mylogin-&gt;logged_in();
  
  
      if ($subdomain == '') {
          .....
      } elseif ($subdomain == 'create') {
          .....
      } elseif ($subdomain == 'join') {
          .....
      } elseif ($subdomain == 'leave') {
          .....
      } elseif ($subdomain == 'assign') {
          .....
      } else {
          .....
      }
  }
  </code></pre>
  
  <p>The logged_in Function checks if the user who's loading this page (sub pages) is logged in. If not he gets automatically redirected in the logged_in function like this:</p>
  
  <pre><code>echo header("Location: /user/login");
  </code></pre>
  
  <p>5 Minutes ago this worked well. Now i created a new subdomain 'assign'.</p>
  
  <p>Now if im not logged in and try to Connect to one of the following URLS i always get redirected</p>
  
  <pre><code>    localhost/user/groups
      localhost/user/groups/2
      localhost/user/groups/create
      localhost/user/groups/join
      localhost/user/groups/leave
  </code></pre>
  
  <p>But if im connecting to </p>
  
  <pre><code>    localhost/user/groups/assign
  </code></pre>
  
  <p>he tries to load this page (what does not work because the $user_id is empty).
  Why the ... does this happen? </p>
  
  <p>Regards Teifun2</p>