Jump to content

Recommended Posts

Posted

Someone is linking to one of the pages on my site with the specific intent of insulting me. Is it possible to block incoming traffic that came from the page where that link is posted? I know I can block IPs, but the visitors coming from that page are from all over the world, so IP banning won't help.

 

Thanks in advance...

Posted

Hi,

 

Basically you can add;

 

>RewriteEngine On
RewriteCond %{HTTP_REFERER} referrerdomain\.com [NC]
RewriteRule .*  -  [F]

to your .htaccess file (replacing referrerdomain by the domain name)

 

There are other ways you can do it to - but if you just want to block that site, that's probably the easiest.

Posted

Thank you so much for the response, Andy! Unfortunately, blocking the entire domain isn't a good option.

 

The person causing the problem is doing so on a single entry he posted to a large journaling site. Since I'm also a member of the journaling site in question, I don't want to ban all incoming traffic from there- I want to be able to link to my TCH site from my profile on the journaling site, and I also want to allow the journaling site to pick up my TCH-hosted blog's RSS feed.

 

So is there any way to block a single page on a domain without blocking the entire domain?

Posted

Just include the page name into the code

 

>RewriteEngine On
RewriteCond %{HTTP_REFERER} referrerdomain\.com/path/page\.htm [NC]
RewriteRule .*  -  [F]

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...