title: URL re-write not working with my Apache using PHP Slim Framework?
body: <p>Ok, I am not sure if this is me but I have just come across the Slim framework for PHP which looks very simple and easy to round about better apps with. I am sure its my .htaccess file and I am not sure what the hell I am doing wrong.</p>
  
  <p>So this works with Slim :</p>
  
  <pre><code>  http://testvm/index.php/hello/4412
  </code></pre>
  
  <p>But this </p>
  
  <pre><code>   http://testvm/hello/4412
  </code></pre>
  
  <p>Gives me a not found error, from Apache,</p>
  
  <p>This </p>
  
  <pre><code>   http://testvm/
  </code></pre>
  
  <p>returns a 404 error from Slim (or at lest I think its a 404 from slim).</p>
  
  <p>This might be a better question for Server Fault but it could be the way I have set up Slim, I am very new to this and to PHP Composer, which I used to install Slim. </p>
  
  <p>This is my index.php file</p>
  
  <pre><code>        &lt;!doctype html&gt;&lt;html&gt;
          &lt;head&gt;&lt;meta charset="utf-8"&gt;&lt;title&gt;Untitled Document&lt;/title&gt;&lt;/head&gt; &lt;body&gt;
          &lt;?php
              require 'vendor/autoload.php';
  
              $app = new \Slim\Slim();
  
              $app-&gt;get('/hello/:name', function ($name) {
                      echo "Hello, $name";
              });
  
              $app-&gt;run();
         ?&gt;
         &lt;/body&gt;&lt;/html&gt;
  </code></pre>
  
  <p>This is my current .htaccess file</p>
  
  <pre><code>       Options +FollowSymLinks
         RewriteEngine On
         RewriteBase /
  
         RewriteCond %{REQUEST_FILENAME} !-f
         RewriteCond %{REQUEST_FILENAME} !-d
         RewriteCond %{REQUEST_FILENAME}.php -f
         #RewriteRule    ^$ /testvm/index.php/  [L]
         #RewriteRule    (.*) /testvm/index.php/$ [L]
  </code></pre>
  
  <p>If I uncomment the bottom two rules I get a server 500 error? </p>
  
  <p>I have already tried </p>
  
  <pre><code>         RewriteEngine On
           RewriteBase /my_app/
  
           RewriteCond %{REQUEST_FILENAME} !-f
           RewriteRule ^ index.php [QSA,L]
  </code></pre>
  
  <p>This makes "/testvm/index.php/hello/XXXX" work but I want it to work without any index.php file within the URL? I am sure this has to be something to do with my .htaccess files.</p>
  
  <p>Now I am running this within a VM (Virtual Machine) which is Ubuntu 13.04, which has been fully updated just not to 13.10 let. I have checked and the rewrite.load is listed within the modes-enable folder in my apache build on this VM.</p>
  
  <p>So what I am doing wrong?</p>
  
  <p>All help some welcome. :)</p>
  
  <p>Glenn.</p>