Forum Moderators: phranque

Message Too Old, No Replies

Redirecting referrals . help needed please

         

lxndr

2:38 pm on Feb 15, 2006 (gmt 0)

10+ Year Member



I have recently discovered that our website is being inundated with referrals from another site which has used a redirect to send spammers to us. A little further investigation has shown that this is being done deliberately. What I would like to do is check for who the referrer is and then send the referrer back to a fixed address on their site.

I have little knowledge of how to do such things but have been told that they are redirecting to our main site address followed by a "?". I'm not sure why the question mark has been added. Anyway, can anyone help or advise me what if anything I can do?

Little_G

3:05 pm on Feb 15, 2006 (gmt 0)

10+ Year Member



Hi,

To redirect incoming requests back to the referer you can use the following in your config:


RewriteEngine on
RewriteCond %{HTTP_REFERER} refererdomain\.com [NC]
RewriteRule ^(.*) http://www.refererdomain.com/ [R=301,L]

For more reference to mod_rewrite look here: http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html [httpd.apache.org]

Andrew

[edited by: jdMorgan at 6:15 pm (utc) on Feb. 15, 2006]
[edit reason] De-linked [/edit]