I want to block all requests from the "Bytespider" robot from Bytedance, but I can't make it work.
I've made a custom template fragment in /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/VirtualHosts/26RewriteTraceAndTrack like this:
{
$OUT =<<'HERE';
RewriteEngine on
RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
RewriteRule .* - [F]
# Block Bytespider from Bytedance
RewriteCond %{HTTP_USER_AGENT} "Bytespider"
RewriteRule .* - [F,L]
#
HERE
}
And then made a signal-event e-smith-apache-update. The file /etc/httpd/conf/httpd.conf looks all right.
But the block doesn't seem to have any effect.