I have a website and need to create a restpoint in a subfolder:
This is my website with some html/php pages:
www.myWebSite.com
Here I need to create my restpoint:
www.myWebSite.com/api
I have a .htaccess
in the api folder:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php [QSA,L]
The PHP code:
require_once '../vendor/autoload.php';
require_once '../generated-conf/config.php';
$app = new Slim\App([
'settings' => [
'displayErrorDetails' => true
]
]);
$app->get('/myWebSite/api', function(){
var_dump("ok");
});
$app->run();
I get 404. What am I missing?