Keywords: WordPress - Amazon Web Services - Technical issue - Other
I've been trying to prevent access to certain user agent strings in Bitnami Wordpress EC2, and after reading through the docs, it seems that the correct file to edit is "Bitnami.conf" in /opt/bitnami/apache2/conf/bitnami/, but nothing seems to work. E.g. I'd like to block this user agent string "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/64.0.3282.119 Safari/537.36"
Blocking by IP isn't possible, as it changes every time. I've tried all the different solutions that I could find, but nothing has worked. Most of the examples I've seen use .htaccess file to do this, but from reading the docs .htaccess is ignored with Bitnami. Is Bitnami.conf the correct file to edit? Could you please provide an example of how to block a user agent string and also by IP address, and where in the file to place it.