Some code examples:
Code:RewriteEngine on
RewriteCond %{HTTP_HOST} !^.*able2know\.com [NC]
RewriteRule (.*) http://www.able2know.com/$1 [R=301,L]
Turns on mod_rewrite
Quote:RewriteCond %{HTTP_HOST} !^.*able2know\.com [NC]
The condition says that if the http host is not (the ! is not equal) able2know, to proccess the rule. The NC is to say it's not case sensitive. Note the escaped periods.
The rule: the (.*) means anything, so it takes any request and passes it on to the $1 (which is a variable) The end of the rule tells it to do a 301 redirect and to process no rules after this, you probably do not want the redirect.
Code:RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://able2know.com/.*$ [NC]
That is an example of a rewrite condition based on referrer. The first rule is for blank referrers and the second for referrers that are not able2know.com
Using these examples, you should be able to make a solution with some experimentation.