I am need to ban this URL to visit my website, but don't know how should I do this?
http://www.skywalkerltd.com/index.php/user-account/pay-per-click/view/66
I'm a new user of Cpanel 11 / Apache / linux Server.
Webmasters Stack Exchange is a question and answer site for pro webmasters. It only takes a minute to sign up.
Sign up to join this communityI am need to ban this URL to visit my website, but don't know how should I do this?
http://www.skywalkerltd.com/index.php/user-account/pay-per-click/view/66
I'm a new user of Cpanel 11 / Apache / linux Server.
If you mean that you want to prevent people from visiting your site from that url, you can check for the referrer header and redirect people from that address to another page or whatever you want to do with them.
You can do this in your htaccess file with something like this:
RewriteEngine on
RewriteCond %{HTTP_REFERER} ^http://www\.example\.com [NC]
RewriteRule \.png http://www.somewhere.com/something.gif [R]
In PHP you can check for a referrer and redirect them with something like this:
<?
$referer = $_SERVER['HTTP_REFERER'];
if ( $referer != "http://first_url" || "http://second_url" || "http://third_url" || "http://fourth_url" ) {
header('Location: http://desired_url);
exit;
};
?>
I don't know how to block specific URLs but here's how you can block them using their IP address. Place this in an htaccess file in your root web directory:
Order Deny,Allow
Deny from 119.40.80.26