I have one domain that is hotlinging my JS scripts, how to send them other script they asked with .htaccess?
I can block request with:
RewriteCond %{SERVER_NAME} ^(www\.)?exampole\.com$
RewriteRule ^ - [F]
But how to serve them another script? Lets say that they request
mydomain.com/script.js
and I want to send them contents of otherdomain.com/otherscript.js
You need to use
%{REMOTE_HOST}
variable to check remote host name. Use your rule like this: