Restler-API-Explorer
Restler-API-Explorer copied to clipboard
404 : Not Found ../resources.json
Hello,
My application is based on Symfony3 framework. And I installed restler using the composer then the related api explorer. I copied the explorer folder under /web (my public folder)
My /web/index.php looks:
$loader = require __DIR__.'/../app/autoload.php';
require_once '../../../vendor/restler.php';
use Luracast\Restler\Restler;
use Luracast\Restler\Defaults;
// [http://projectstestingserver.com/crime/Restler3/public/]
//set the defaults to match your requirements
Defaults::$throttle = 20; //time in milliseconds for bandwidth throttling
$r = new Restler();
$r->addAPIClass('Luracast\\Restler\\Resources'); //this creates resources.json at API Root
$r->setSupportedFormats('JsonFormat', 'XmlFormat', 'CsvFormat');
$r->addAPIClass('Say'); // repeat for more
$r->addFilterClass('RateLimit'); //Add Filters as needed
$r->handle(); //serve the response
/web/.htaccess looks:
DirectoryIndex index.php
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /explorer
RewriteRule ^$ index.php [QSA,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php [QSA,L]
</IfModule>
<IfModule mod_php5.c>
php_flag display_errors On
</IfModule>
by calling url: (http://localhost/explorer/index.html) I get '404 : Not Found ../resources.json'.
Did I missed something in the configuration.
It would be appreciated to get some answers.
regards