# Redirect all requests to public folder
RewriteEngine On

# If the request is for a real file or directory, serve it
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

# Otherwise, redirect to public folder
RewriteRule ^(.*)$ public/$1 [L]

# If accessing root, redirect to public
RewriteRule ^$ public/ [L]
