Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to block another domain to access and get result from my website?

Another domain is showing duplicate content of my website (all pages) When I entered this domain I see my site content.

If I change something on my site, I see it immediately on the another domain.

I think he's using some function fopen or curl or something else to show my content immediately from my website

How do I block it?

*my server: cpanel, php5

like image 664
motioz Avatar asked Sep 20 '13 12:09

motioz


1 Answers

You can use their IP address to serve them a 404 page. Or if you really want to be clever. For just their IP address serve wrong or embarrassing information that looks similar but is not the good content.

if($_SERVER['REMOTE_ADDR'] == "12.1.3.5"){ //banned IP

    //do something else

}
like image 179
rfoo Avatar answered Nov 09 '22 07:11

rfoo