1

In my .htaccess file, I'm currently using RewriteCond to match the user agent of bad bots.

I know that SetEnvIf can also be used to block bad bots too.

The question is, what's the difference between RewriteCond and SetEnvIf?

Is one better than the other when it comes to server performance?

Thanks!

Zero
  • 55
  • 5

1 Answers1

1

RewriteCond is part of mod_rewrite and this is really resources intensive module, so if you can do what you need without it, SetEnvIf or otherwise i would say it's much better.

Aleksandar Ivanisevic
  • 3,377
  • 21
  • 24