title: CodeIgniter multiple applications htaccess
body: <p>I wan't to divide my CI into multiple applications. I should say that it is within a folder called app on the root /var/www/app/. First I tried this setup:</p>
  
  <pre><code>/system/
  /application/
    /app1/
    /app2/
  app1.php
  app2.php
  .htaccess
  </code></pre>
  
  <p>But I couldn't get my htaccess to point correctly. Therefore I went ahead with this:</p>
  
  <pre><code>/system/
  /app1/
    .htaccess
    /application/
    index.php
  /app2/
    .htaccess
    /application/
    index.php
  </code></pre>
  
  <p>And now it works fine with urls: mysite.com/app/app1/index.php/welcome - but I would like to hide index.php from the URL. Therefore my .htaccess looks like this:</p>
  
  <pre><code>RewriteEngine on
  RewriteCond $1 !^(index\.php|gfx|css|js|robots\.txt)
  RewriteRule ^(.*)$ index.php/$1 [L]
  </code></pre>
  
  <p>However it is not working, I get 404 when trying to access mysite.com/app/app1/welcome.
  Could someone clarify whats wrong with my .htaccess? I have another .htaccess on the root and will run some wordpress from there, but would it affect my /app folder where CI runs?
  Thank you so much!</p>