Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{HTTP_USER_AGENT} !Mozilla [NC]
    RewriteRule ^ - [F]
</IfModule>


Once you modify the rule in httpd.conf, you should run below commands to take it effect

Code Block
sudo systemctl restart httpd # on CentOS/RHEL
sudo systemctl restart apache2 # on Debian/Ubuntu

...