Skip to content
This repository has been archived by the owner on Jun 9, 2019. It is now read-only.

404 : Not Found ../resources.json #22

Open
engharb opened this issue Jun 9, 2017 · 0 comments
Open

404 : Not Found ../resources.json #22

engharb opened this issue Jun 9, 2017 · 0 comments

Comments

@engharb
Copy link

engharb commented Jun 9, 2017

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant