-1

One of my competitor redirect my site to their own site.I need .ht access code to block that.SO,that no one can redirect my site.

1 Answers1

0

as per your comments I think your website is redirecting by the cpanel option redirects.

enter image description here

check this option. redirecting might be due to this.

enter image description here

no htaccess will work in this condition.

Update

for htacccess

# BLOCK SITE REFERRERS
RewriteEngine on
 RewriteCond %{HTTP_REFERER} badsite\.com [NC,OR]
 RewriteCond %{HTTP_REFERER} www\.badsite\.com [NC,OR]
 RewriteCond %{HTTP_REFERER} http\://badsite\.com [NC,OR]
 RewriteCond %{HTTP_REFERER} http\://www\.badsite\.com [NC]
RewriteRule .* - [F]

I also suggest you to change the login details of your cpanel ASAP

urfusion
  • 5,528
  • 5
  • 50
  • 87