Skip to content

Instantly share code, notes, and snippets.

@joelemanoel
Last active May 19, 2021 01:48
Show Gist options
  • Save joelemanoel/bc94d7a7c6185a49af5dd82bd8d01e5a to your computer and use it in GitHub Desktop.
Save joelemanoel/bc94d7a7c6185a49af5dd82bd8d01e5a to your computer and use it in GitHub Desktop.
create .htaccess and block curl user agent on MK-Auth
#!/bin/bash
for filename in /opt/mk-auth/*; do
echo 'BrowserMatchNoCase "curl" bots
Order Allow,Deny
Allow from All
Deny from env=bots' >> $filename'/.htaccess';
done
echo 'BrowserMatchNoCase "curl" bots
Order Allow,Deny
Allow from All
Deny from env=bots' >> '/var/www/.htaccess';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment