Options -Indexes
DirectoryIndex index.php
RewriteEngine On

# Root branding assets are shipped at /assets for wrapper-safe URLs.
RewriteRule ^assets(/|$) - [L]

# Keep real application, installer, asset and API paths directly accessible.
RewriteRule ^(public|install)(/|$) - [L]

# Friendly root-level administrator routes for deployments whose document root
# is the LicenseHub package root (typical cPanel subdomain installation).
RewriteRule ^login\.php$ public/login.php [L,QSA]
RewriteRule ^logout\.php$ public/logout.php [L,QSA]
RewriteRule ^(operations|products|customers|customer-users|licenses|activation-codes|installations|installation-status|updates|update-counts|signing-keys|backups)\.php$ public/$1.php [L,QSA]
RewriteRule ^portal(/.*)?$ public/portal$1 [L,QSA]
RewriteRule ^api(/.*)?$ public/api$1 [L,QSA]

# Root request is handled by index.php, which routes uninstalled systems to
# /install/ and installed systems to the branded administrator sign-in.
RewriteRule ^$ index.php [L]

# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php83” package as the default “PHP” programming language.
<IfModule mime_module>
  AddHandler application/x-httpd-ea-php83 .php .php8 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit
