All requests to be handled by OJS (API or otherwise) are expected to be processed through OJS’s index.php.
I use the following standard re-write rule to accomplish this at the journal level:
# If the URI already has index.php in it, don't change it
RewriteCond %{REQUEST_URI} !/index.php/
# Skip existing directories if Apache 2.2 or later
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d
# Skip existing files if Apache 2.2 or later
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
# Skip existing directories if Apache prior to 2.2
RewriteCond %{REQUEST_FILENAME} !-d
# Skip existing files if Apache prior to 2.2
RewriteCond %{REQUEST_FILENAME} !-f
# Rewrite all other requests to a specific journal in OJS
RewriteRule ^(.*)$ /index.php/JOURNALNAME/$1 [QSA,L]
I can confirm that this works for OJS 3.1.1-4.
My deployment uses these directives at an Apache virtualhost level, which greatly simplifies the work, because the virtualhost determines which journal is being accessed. To make this same strategy work in an .htaccess file in one Apache virtualhost which is handling multiple different domain names should be possible, but you would need to repeat this directive for each journal, with exclusion criteria so that it does not operate on every other possible domain name.