RewriteEngine on RewriteCond %{HTTP_HOST} ^(www.)?google.com$ RewriteCond %{REQUEST_URI} !^/public/ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ /public/$1 RewriteCond %{HTTP_HOST} ^(www.)?google.com$ RewriteRule ^(/)?$ public/index.php [L] # Hide a specific file Order allow,deny Deny from all