Skip to main content

Code to block specific bot

Comments

3 comments

  • cPRex Jurassic Moderator
    Hey there! That should work well, just ensure you include it in the IfModule block like this: RewriteEngine On RewriteCond %{HTTP_REFERER} zhanzhang\.toutiao\.com [NC] RewriteRule .* - [F]
    You would want to place this above any cPanel-generated PHP entries at the bottom of the file, but below any general site rewrite rules, such as those added by WordPress.
    0
  • Melis
    Thanks @cPRex.
    0
  • cPRex Jurassic Moderator
    Sure thing!
    0

Please sign in to leave a comment.