how to block traffic from one web site...

pavan

Jr. VIP
Jr. VIP
Joined
Mar 30, 2008
Messages
2,422
Reaction score
663
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'];
 

AlphaTwin

Junior Member
Joined
Jun 11, 2009
Messages
103
Reaction score
55
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>
 

cagefighter

Junior Member
Joined
Nov 13, 2009
Messages
109
Reaction score
102
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>
 

justone

BANNED
Joined
Oct 12, 2008
Messages
1,521
Reaction score
1,054
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
 

TeKn1qu3z

Senior Member
Joined
Jul 26, 2012
Messages
998
Reaction score
260
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.
 

eXampL

Power Member
Joined
Jan 24, 2015
Messages
529
Reaction score
378
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..
 
Top