RewriteEngine On

# Serve the built admin app directly at the project root and at /admin.
RewriteRule ^$ public/admin/index.html [L]
RewriteRule ^admin/?$ public/admin/index.html [L]
RewriteRule ^admin/(.*)$ public/admin/$1 [L]

# Keep CodeIgniter routes and API working from the public folder.
RewriteRule ^(.*)$ public/$1 [L]
