<IfModule mod_rewrite.c>
RewriteEngine On

Options -Indexes

RewriteCond %{REQUEST_URI} !^public
RewriteRule ^(.*)$ public/$1 [L]

RewriteCond %{REQUEST_URI} !^/(install|install/.*)$
RewriteRule ^(.*)$ public/install/index.php [L]
</IfModule>