I have a PHP application based on Slim framework with static files in `/public` directory and following `.htacces` file:

```
# URL routing
Options -MultiViews
RewriteEngine On

RewriteCond %{DOCUMENT_ROOT}/public%{REQUEST_URI} -f
RewriteRule ^ %{DOCUMENT_ROOT}/public%{REQUEST_URI} [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [QSA,L]

```

When I trying to access /index.php Apache returns it directly, but I want it to be passed to be rewritten to index.php (which will return 404 not found). How can I do it?

If I try to remove `RewriteCond %{REQUEST_FILENAME} !-f`:

```
# URL routing
Options -MultiViews
RewriteEngine On

RewriteCond %{DOCUMENT_ROOT}/public%{REQUEST_URI} -f
RewriteRule ^ %{DOCUMENT_ROOT}/public%{REQUEST_URI} [L]

RewriteRule ^ index.php [QSA,L]

```

Apache returns me "Internal server error". How can I get it done?

Upd: my project structure

```
www/
├── app/
├── cache/
├── public/
│   ├── css/
│   ├── img/
│   └── js/
├── vendor/
├── views/
└── index.php

```