Is the contact-us.php script in the xx directory? If so, add a / within the character range definition (move the - to the first character where it belongs and then add the / after the 9). If not, simply remove the start anchor (the ^) … but expect relative links to be offset by one directory level (resolve that issue by using absolute INTERNAL links rather than EXTERNAL or RELATIVE links).
Actually, the - is “required” to be the first character in order to avoid being interpreted as a metacharacter within a character range definition. Of course, in the real world, the - can be anywhere where it can not possibly be interpreted as the metacharacter (including the last position) but my mentioning it was specifically so you would NOT add the / AFTER the -.
Just a side comment: localhost/www/domain.com looks pretty strange … but that’s because I’ve been using virtual hosts on my test (localhost) server for so many years. May I recommend that you:
Update your hosts file to add 127.0.0.1 domain (do NOT use Domain.com on your localhost as you want to be able to see your production website, too!) - do this as ADMINISTRATOR or you will not be able to save the file!
Update your httpd-vhosts.conf file to include your domain virtual host - just follow the example in the file or come back to ask for what’s needed). Ditto the Admin comment IF Apache is in Program Files (a good reason NOT to install there!).
Update your httpd.conf file to have it include your extras/httpd-vhosts.conf file - with the same Admin comment as above.
You’ll come to LOVE being able to use virtual domains to access your master copies of your websites with little change in the .htaccess ({HTTP_HOST} will either contain .com or not and you can fork your redirections based on that).
I shall have to get my head around your recommendations. The reason I started using the full domain name locally is it makes FTPing easier. I have domains with several various suffixes: .com, .co.uk, .eu, .org.uk; even a .me.uk and a .info !