The bottom line is clear: we need to bring all requests to the site /path/to/file.html in file index.php with the appropriate GET parameters. The network has seen a few solutions but not sure what to use right (for example, it is impossible to see the map of clicks with Yandex metrics because of its get-parameters)
That's what I use:
RewriteRule ^([^/]*)\\.html$ /index.php?query=$1 [L]
RewriteRule ^([^/]*)/([^/]*)\\.html$ /index.php?query=$1&id=$2 [L]
RewriteRule ^([^/]*)/([^/]*)/([^/]*)\\.html$ /index.php?query=$1&id=$2microid=$3 [L]
How to do better?