rewriterule

— .htaccess
RewriteEngine On

RewriteCond %{HTTP_HOST} ^(.*)\.html\.local$
RewriteRule ^$ /index.php?id=%1 [L]
# (.*) == variable %1
# [L] flag last, apply condition to here

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ http://html.local/index.php?id=$1 [L]
# server variable == $1 $2 …

— index.php

If url is
http://admin.html.local
::result
admin

If url is
http://tester.html.local
::result
tester

If url is
http://admin.html.local/aaa
::result
aaa