: 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
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 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: desired_url); exit;
};
?>
More posts by @Murphy175
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.