There is lots of info on redirection based on referrer, but this is not what is requested.
I need the target website to see the url (or at least the domain) from where the visitor was redirected. Usually, if the user clicks on a link (domain1) to a webside that redirects the user via htaccess (domain2) to an other website (domain3), then the server that domain 3 sits on loggs the website where the link was clicked (domain1) as referrer. I need the redirecting website (domain2) to be passed as referrer.
A usual redirect would be:
RewriteEngine on
RewriteRule ^(.*)$ http://www.newdomain.com/$1 [R=301,L]