title: Restler always returns 404: Not found
body: <p>I have installed Restler on my local server to test and make some APIs for my project.</p>
  
  <p>Api requests are handled via <code>http://localhost/myproject/api/</code>.</p>
  
  <p>The problem is that everytime i try to make a request i get the following error:</p>
  
  <pre><code>{
      "error": {
          "code": 404,
          "message": "Not Found"
      },
      "debug": {
          "source": "Routes.php:383 at route stage",
          "stages": {
              "success": [
                  "get"
              ],
              "failure": [
                  "route",
                  "negotiate",
                  "message"
              ]
          }
      }
  }
  </code></pre>
  
  <p>Also this is my <code>.htaccess</code>:</p>
  
  <pre><code>RewriteEngine on
  RewriteBase /
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^api(.*)$ /myproject/api/api.php [QSA,L]
  </code></pre>
  
  <p>And this is what the <code>api.php</code> looks like:</p>
  
  <pre><code>namespace myproject;
  
  use Luracast\Restler\Restler;
  
  require_once($_SERVER["DOCUMENT_ROOT"]."/myproject/resources/engine/settings.php");
  require_once(Settings\Path\Absolute::$library."/restler/vendor/restler.php");
  
  $restler = new Restler();
  $restler-&gt;addAPIClass("myproject\\User");
  $restler-&gt;handle();
  </code></pre>
  
  <p>I guess there's some misconfiguration around, but i really can't figure out what's wrong.</p>
  
  <p>(I also tried some solutions on Stackoverflow but they doesn't seem to work for me)</p>
  
  <p><strong>Edit:</strong></p>
  
  <p>I tried reaching the example using the following path  <code>http://localhost/myproject/resources/engine/library/restler/public/examples</code> and they're working, so i guess it has to do with the configuration of Restler itself because it doesn't seem to work in <code>http://localhost/myproject/api</code>.</p>
  
  <p>Furthermore i also tried copying the Restler Explorer in <code>http://localhost/myproject/api/explorer</code> and i keep receiving the error: <code>404 : Not Found ../resources.json</code> probably because i didn't install Restler in the root folder of my project. How am I supposed to install Restler in a different subfolder?</p>
  
  <p><strong>Edit 2:</strong>
  I just moved the following class into the example 001 folder:</p>
  
  <pre><code>class User {
  
      function data() {
  
          return "HELLO!";
      }
  }
  </code></pre>
  
  <p>and added this line inside the <code>index.php</code> of the example:</p>
  
  <pre><code>$r-&gt;addAPIClass('User');
  </code></pre>
  
  <p>If i try to run the example at <code>.../_001_helloworld/index.php/say/hello</code> it works without problems but if i try <code>_001_helloworld/index.php/user/data</code> it isn't.</p>
  
  <p>At this point i have lost every hope and i really need help 'cause really i'm missing something but really can't guess what :( <strong>HELP!</strong></p>