title: CodeIgniter 404 Page Not Found, but why?
body: <p>I am using CodeIgniter for two applications (a public and an admin app).
  The important elements of the document structure are:</p>
  
  <pre><code>/admin
  /admin/.htaccess
  /admin/index.html
  /application
  /application/admin
  /application/public
  /system
  .htaccess
  index.php
  </code></pre>
  
  <p>The /admin/.htaccess file looks like this: </p>
  
  <pre><code>DirectoryIndex index.php
  RewriteEngine on
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.*)$ ./index.php/$1 [L,QSA]
  </code></pre>
  
  <p>The /admin/index.php has the following changes:</p>
  
  <pre><code>$system_folder = "../system";
  $application_folder = "../application/admin"; (this line exists of course twice)
  </code></pre>
  
  <p>And the /application/admin/config/routes.php contains the following: </p>
  
  <pre><code>$route['default_controller'] = "welcome";
  $route['admin'] = 'welcome';
  </code></pre>
  
  <p>Welcome is my default controller.</p>
  
  <p>When I call up the Domain/admin I get a 404 Page Not Found error. When I call up the Domain/admin/welcome everything works fine. In the debug logs I get the following error message: </p>
  
  <pre><code>DEBUG - 2010-09-20 16:27:34 --&gt; Config Class Initialized
  DEBUG - 2010-09-20 16:27:34 --&gt; Hooks Class Initialized
  DEBUG - 2010-09-20 16:27:34 --&gt; URI Class Initialized
  ERROR - 2010-09-20 16:27:34 --&gt; 404 Page Not Found --&gt; admin
  </code></pre>
  
  <p>Weirdly enough this setup works perfectly on my local MAMP installation (with the localdomain/admin/), but when I publish and test it on the "live" server, I just get 404 errors. </p>
  
  <p>Any ideas? What am I doing wrong?
  Thanks
  C.</p>