To remove public/index.php in Lumen?

I want to place in one folder several projects Lumen.
For example, the domain
domen.com
create a subdomain
sub.domen.com
In the folder hosting sub put projects Lumen.

Now in every project I put .htaccess

<ifmodule mod_rewrite.c>
 RewriteEngine On
 RewriteRule ^(.*)$ [folder-name]/public/$1 [L]
</ifmodule>

where folder-name is the folder name of a specific project Lumen.

On request
sub.domain.com/[folder-name]/
The project will start, but throws an error:
c00ea942652848bd8b164f68bccf19ee.png

On request
sub.domain.com/[folder-name]/index.php
routing works as expected.

How to make a request without public/index.php in Lumen?
July 9th 19 at 11:00
1 answer
July 9th 19 at 11:02
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ [folder-name]/public/index.php/$1 [L]

Find more questions by tags ApachehtaccessLaravel