: Unwanted redirect from a domain to my site An external person from my client company registered a domain and redirected to my client URL. For instance, if you type unwanteddomain.com it redirects
An external person from my client company registered a domain and redirected to my client URL.
For instance, if you type unwanteddomain.com it redirects to myclientdomain.com.
Is there any way to block or redirect (for second time) to nowhere the unwanteddomain.com via cPanel or any rewrite rules on .htaccess?
More posts by @Candy875
2 Comments
Sorted by latest first Latest Oldest Best
Finally resolved using these rewrite rules:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www.unwanteddomain.com$ [NC]
RewriteRule .* whateverPlaceYouWantToSend.com [R,L]
HTTP_REFERER did not work so I used HTTP_HOST.
The way I would do this is block all requests which are coming from unwantedcomain.com by checking for HTTP_REFERER
Block traffic from a single domain:
RewriteEngine on
RewriteCond %{HTTP_REFERER} unwateddomain.com [NC]
RewriteRule .* - [F]
Block traffic from multiple domains:
RewriteEngine on
RewriteCond %{HTTP_REFERER} unwanteddomain.com [NC,OR]
RewriteCond %{HTTP_REFERER} anotherdomain.com
RewriteRule .* - [F]
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.