I have my .htaccess configured with the following lines
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [L]
RewriteCond %{REQUEST_URI}::$1 ^(/.+)/(.*)::$
RewriteRule ^(.*) - [E=BASE:%1]
RewriteRule ^(.*)$ %{ENV:BASE}/index.php [L]
But when you try to access the friendly urls, you mark 404 error
That only happens in Ubuntu Server 18.04 with apache2 and php7.2, I have run it from XAMPP and other servers and it works perfectly.
The following url is an example.
ip_server / apidata / user