I am developing an app with PHP 7.0 and implementing routes with MVC. My root folder ('/') is the 'public' directory. When I access the address 'localhost' I am redirected to index.php with have the routes available. But when I try another url to access another route, like 'localhost/contact' the server doesn't find the entry and give this message:

```
Not Found

The requested URL /contact was not found on this server. 

```

I am pretty sure that the problem in on my server config (apache2 on linux mint 18), because my friend's PC works normal. I'm using a .htaccess file too inside the public directory:

```
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]

```

It seems to me that the server does not run index.php and tries to access the path. How could I ever force the execution of index.php to see if there is a route to the url informed?

here follows my apache2 config files.

<http://pastebin.com/2mgSjWWV>

<http://pastebin.com/yD4RpfK8>

I'm still newbee and I understand very little in server configuration. Please someone can give me a light? Thanks!