I've two domain names which are pointing towards the same directory, but I must redirect them (via mod_rewrite in htaccess) with a specific .html when striking home.

if (domain == 'firstdomain')
redirect firstdomain.html
else if (domain == 'seconddomain')
redirect seconddomain.html


[..] I must redirect these to some specific .html when striking home.

A language like PHP is much better suited to redirecting just one page.

The next code will redirect http://example.com/ to http://example.com/example.html and http://example.org/ to http://example.org/anotherpage.html. http://www.example.com is going to be untouched (note the www. part)

RewriteCond %{HTTP_HOST} ^example.com$ [NC]
RewriteRule ^$ example.html [R]
RewriteCond %{HTTP_HOST} ^example.org$ [NC]
RewriteRule ^$ anotherpage.html [R]

The very first line matches the HTTP Host area (a.k.a. 'domain') against example.com situation-insensitive (^ marks the start of the string, $ marks the finish). If there's a match, the page is going to be rerouted (second line, [R]) to example.html Exactly the same story for that third and 4th lines.