Ok, I have come to realize that the code I gave won't work for the root page of a folder (ie domain.tld/). The following code should work in all cases:
Code:
RewriteCond %{query_string} ref=pislikcs.com
RewriteRule (.*) http://www.example.com/$1? [R=301,L]