Forum Moderators: coopster
I've discovered a few ways you can ban visitors fr. these domains to access the site. Someone suggested this php script which I tried to insert into my header.php file:
<?php
$urls[0]='http://www.banneddomain.com';
$urls[1]='http://banneddomain.com/';
$ref=strtolower($_SERVER['HTTP_REFERER']);
$url='http://www.mydomain.com/403.shtml';
if(!in_array($ref, $urls)){
header('Location: '.$url);
}
?> But after trying to add the script in 3 diff. places within the file I couldn't get it to work. When I tried to access my site I'd get a blank browser screen. Finally, I had to use ftp to remove the script.
Can anyone think of how this conflict might arise? Is there possibly something wrong w. the script (which I didn't write)?
I'd get a blank browser screen
Looks like an error somewhere in a script on that page.
Have you looked in the error_log file about what the web server was thinking about that?
trying to add the script in 3 diff. places
Regards,
R.