I always get 404

I have a website and need to create a restpoint in a subfolder:

This is my website with some html/php pages:

Here I need to create my restpoint:

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(){

I get 404. What am I missing?

Your declared route is www.myWebSite.com/myWebSite/api, do you get a 404 response with specifically this URL?

Trying to navigate to http://www.mywebsite.com/myWebSite/api leads me to the 404. Actually I get the 404 with all urls, the point is that I don’t really know how I have to specify them when calling $app->get().