Helicon Tech - ISAPI_Rewrite: RewriteRule's for specific domains

Could someone help me translate the following pseudo-code into code understood by Helicon Tech's ISAPI_Rewrite module:
if (domain == something.com OR domain == www.something.com)
{
    // The rules inside this scope will only apply to the domain:
    // something.com / www.something.com

    // This should match "something.com/test" and/or "www.something.com/test"
    RewriteRule /something /something/something.aspx
}

if (domain == test.com OR domain == www.test.com)
{
    // The rules inside this scope will only apply to the domain:
    // test.com / www.test.com

    // This should match "test.com/test" and/or "www.test.com/test"
    RewriteRule /test /test/test.aspx
}

The documentation is very confusing to me.
Any and all help is much appreciated. 

If ISAPI_Rewrite works the same as Apache’s mod_rewrite, try this:
RewriteCond %{HTTP_HOST} ^(www\.)?something\.example$
RewriteRule ^/something$ /something/something.aspx

RewriteCond %{HTTP_HOST} ^(www\.)?test\.example$
RewriteRule ^/test$ /test/test.aspx

Note: I used other domain names according to RFC 2606.

Edit: It seems that for ISAPI_Rewrite you have to replace the %{HTTP_HOST} by Host: to get the current host.

Thanks for the effort Gumbo and Tomalak. Really appreciate it.
I've figured out another approach though: you put a file (httpd.ini) holding specific rewrite's to a specific virtual directory/domain in the root folder of that virtual directory/domain.
This eliminates polluting the global config file as well.