Forum Topic: block/redirect traffic coming from a particular website
Hi Jeff,
Is it possible to block/redirect traffic that comes from a particular website? I use the following code but it doesn’t work.
RewriteEngine on
# Options +FollowSymlinks
RewriteCond %{HTTP_REFERER} samplesite\.com [NC]
RewriteRule .* - [F]
Thank you in advance.
2 Replies to “block/redirect traffic coming from a particular …”
It looks like that should work, but there are several things that you can check:
- Is the target domain correctly matched in the RewriteCond
- Is the referring site sending matching referrer infos
- Is mod_rewrite enabled and working on your server
- Does WP or another CMS include its own rewrite rules
Then even if all of these things are good, there may be other factors (plugins, scripts, etc) that are interfering in the process.
I hope this provides some clues, good luck.
Thanks so much for your reply, much appreciated.
I’ll look into the factors you mentioned above. Currently it doesn’t work but I’m sure there’s a workaround to it.