# Orbit subdirectory deployment: https://example.com/orbit/
Options -Indexes

RewriteEngine On
RewriteBase /orbit/

# Pass the installation folder to PHP so routes and redirects can remove it.
SetEnv ORBIT_BASE_PATH /orbit
SetEnvIf Request_URI "^/orbit(?:/|$)" ORBIT_BASE_PATH=/orbit

# Installer
RewriteRule ^install/?$ public/install.php [L]
RewriteRule ^install\.php$ public/install.php [L]

# Public assets
RewriteRule ^assets/(.*)$ public/assets/$1 [L]

# Never expose application internals
RewriteRule ^(?:app|config|database|resources|routes|storage)(?:/|$) - [F,L]
RewriteRule ^\. - [F,L]

# All remaining requests go to the public front controller.
RewriteRule ^ public/index.php [L]
