This script generates a .htaccess file based on the referrer spam blacklist from https://github.com/matomo-org/referrer-spam-blacklist. If you prefer to use httpd.conf, just copy the content of the generated .htaccess file to your httpd.conf.
-
Clone (or download) Matomo's referrer-spam-blacklist and this repository.
git clone https://github.com/matomo-org/referrer-spam-blacklist.git && git clone https://github.com/kambrium/apache-referrer-spam-blacklist.git -
Change to the directory
apache-referrer-spam-blacklist, set permissions and execute the script. The.htaccessfile should be created in the directoryapache-referrer-spam-blacklist.cd apache-referrer-spam-blacklist chmod u+x apache-referrer-spam-blacklist.sh ./apache-referrer-spam-blacklist.sh
CC0 1.0 Universal