title: Place index.php under public folder in ubuntu 16.04 LTS using .htaccess
body: <p>I've tried a lot o tutorials, searched and researched on stackoverflow and other websites, but I still don't manage to fix this problem.
  Here's it. 
  This is my folder structure and the.htaccess and index.php files:</p>
  
  <p><a href="https://i.stack.imgur.com/IeYVt.png" rel="nofollow noreferrer">file structure | .htaccess | index.php</a></p>
  
  <p>When I try to access php built in server (sudo php -S localhost:800) I get this:</p>
  
  <p><a href="https://i.stack.imgur.com/PVMz1.png" rel="nofollow noreferrer">Php built-in server</a></p>
  
  <p>When using apache2 I get the folder structure like this:</p>
  
  <p><a href="https://i.stack.imgur.com/Rf6j8.png" rel="nofollow noreferrer">Apache Server</a></p>
  
  <p>I have also tried to change the DirectoryIndex to public/index.php, but when typing a query string (SEO friendly with slashes instead of ex.:?a=2) I get an error, the server says for example:</p>
  
  <p><strong><em>The requested resource /mvc-oop/home/id/2 was not found on this server.</em></strong></p>