Redirect all calls to index.php and make sure the path requested is not a filename or directiory in .htaccess in public folder.