Dear All,
Please help me to fix this I am new to RewriteEngine Rules

I have a WHOIS Lookup Script on my website
The URL is

Now I need to achieve this

So I wrote

RewriteEngine On
RewriteRule ^([\w\-]*)$ whois.php?domain=$1

In the above code I am not getting the domain extension passed, I know the code is wrong, but dont know where.

Please HELP.