0

Good night! I'm trying to use the restler, yet sempe have the same problem: 404: Not Found ../resources.json

This is my .htaccess file

DirectoryIndex index.php index.html
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /api/explorer
    RewriteRule ^$ index.html [QSA,L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.html [QSA,L]
</IfModule>
<IfModule mod_php5.c>
php_flag display_errors On
</IfModule>

I've tried already do:

change the httpd.conf and put:

 AllowOverride All
 Options FollowSymLinks

follow several suggestions given by similar preguntas here. tried to do what is suggested here

Restler always returns 404: Not found

copy the folder explorer for api folder ... But none of this works, please tell me what can I be doing wrong? Is it to be using wamp?

edited: here is the addiction of resources class

<?php
require '../../bootstrap.php';

use Luracast\Restler;
use TDI2014\Resource;

$r = new Restler\Restler();
$r->addAPIClass(Resource\Student::class);
$r->addAPIClass('Resources');
$r->handle();

here's a print of my page enter image description here

this is my json response:

{
    "error": {
        "code": 404,
        "message": "Not Found"
    },
    "debug": {
        "source": "Routes.php:436 at route stage",
        "stages": {
            "success": [
                "get"
            ],
            "failure": [
                "route",
                "negotiate",
                "message"
            ]
        }
    }
}
Community
  • 1
  • 1
Vera Rodrigues
  • 83
  • 1
  • 10
  • Did you add `Resources` as an Api class? The 404 response you are getting, does that include a json response? – Arul Kumaran Dec 12 '14 at 13:13
  • First I apologize for not being the answer now , but I've been without internet connection . Yes I added the class, so I have : ( edited the question because I can not put code here ) – Vera Rodrigues Dec 16 '14 at 17:22

0 Answers0