title: Codeigniter in subdirectory - why does resolving controller/class/function not work?
body: <p>I have a base codeigniter setup and can not get it to run. I thought I had understood that it works like the following:</p>
  
  <pre><code>http://localhost/index.php/class/function
  </code></pre>
  
  <p>where <code>class</code> points to the controller.</p>
  
  <p>The problem I have is that my install is in a subfolder like so:</p>
  
  <pre><code>http://localhost/path%20to%20ci/index.php/class/function
  </code></pre>
  
  <p>and CI always gives me a 404 even the controller class exists.</p>
  
  <p>I've digged into the CI source and it shows me that the whole request URI is taken as input:</p>
  
  <pre><code>path to ci/index.php/class/function
  </code></pre>
  
  <p>Is there anything I need to configure to make CI detect the prefix automatically for  resolving <code>class</code> and <code>function</code>?</p>
  
  <p>Can I or even do I need to setup a base path?</p>
  
  <p><strong>Concrete Example</strong></p>
  
  <p>My CI path is accessible via:</p>
  
  <pre><code>http://localhost/workspace/Limesurvey%20CI/index.php
  </code></pre>
  
  <p>The working controller is:</p>
  
  <pre><code>http://localhost/workspace/Limesurvey%20CI/index.php/installer
  </code></pre>
  
  <p>Setting the base path in <code>application/config/config.php</code> to:</p>
  
  <pre><code>$config['base_url'] = 'http://localhost/workspace/Limesurvey%20CI/';
  </code></pre>
  
  <p>which is according to the documentation given for that setting.</p>