how to block traffic from one web site...

kkvsam

Senior Member
Oct 11, 2009
938
569
Hey ,

I immediately need help.I need to block traffic from one web site .Can you tell me how to do it or redirect to another site?
 
u can do it if u know php
I dnt have the exact code but
edit ur index file
and check the referer
if its = domain.com (that you want to block)
redirect it to google.com

somewhat like this

Code:
$referer = $_SERVER['domain.com'];
 
I have blogger site

On Blogger you can't enter custom PHP code.
But you can include the following javascript in the Template:

Code:
<script>
if   (document.referrer = "http://badpage.com") location.href = "http://www.google.com"; 
</script>
 
You can block the IP or the referrer in .htaccess

Sorry starting typing that then looked up and saw Alpha post and since u dont have access to your .htaccess on the server then java is the way to go just make sure u post the java above in the <head>
 
On Blogger you can't enter custom PHP code.
But you can include the following javascript in the Template:

Code:
<script>
if   (document.referrer = "http://badpage.com") location.href = "http://www.google.com"; 
</script>


Can you explain this.and Can I redirect those traffic only.If can ,how
 
Alpha already helped you.
Thank him by using the thanks button and read those 3 lines of simple javascript code.
Even as non-programmer you should be able to understand it. That's just like normal language with a few extra charaters
 
There are so many ways to do that type of blocking, however My best method is to use Cpanel or a code i the Index file. If you are on a a platform of CMS try to use plugin if that is built.
 
Don't you guys think that op found a solution during the last 6 years or so?

Try what alpha said , it will fix your prob

Block traffic through cpanel.. By adding that site ip..

There are so many ways to do that type of blocking, however My best method is to use Cpanel or a code i the Index file. If you are on a a platform of CMS try to use plugin if that is built.

.htaccess is best way i guess..
 
Back
Top
AdBlock Detected

We get it, advertisements are annoying!

Sure, ad-blocking software does a great job at blocking ads, but it also blocks useful features and essential functions on BlackHatWorld and other forums. These functions are unrelated to ads, such as internal links and images. For the best site experience please disable your AdBlocker.

I've Disabled AdBlock