RewriteEngine On

# Allow license suspended screen
RewriteCond %{QUERY_STRING} (^|&)blocked=1(&|$) [NC]
RewriteRule ^ - [L]

# Allow blocked.php directly
RewriteRule ^blocked\.php$ - [L]

# Allow final success page after installation
RewriteCond %{QUERY_STRING} (^|&)step=7(&|$) [NC]
RewriteRule ^index\.php$ - [L]

# Block all other installer access after installation completes
RewriteCond %{DOCUMENT_ROOT}/storage/installed.lock -f
RewriteRule ^ - [F,L]
