I find that using the AWstats contrib and then finding the offenders and then renaming/replacing the file they linked to with something else is more fun. Then sit back and see how long it takes them to remove the link.
Is is called hotlinking, do a search on Google about hotlinking and apache and you will find stuff like this:
http://www.webmasterstop.com/62.htmlMod-rewrite is already available and enabled on every SME Server by default, you only need to use the template system to modify the configuration file with the proper RewriteRules for all servernames generated by SME Server. At the moment I do not have the time to generate the code for you, but you can find out how the template system works by reading the SME Server Developers Guide linked in the wiki.
A warning do not edit the template fragments in the /etc/e-smith/templates tree, make a copy of the needed section and create it's layout in the /etc/e-smith/templates-custom/ tree and make your changes in that copy, this way you can easily revert to the original settings later or when things go wrong by removing the fragment that causes the error. Above that the template system makes sure changes are kept over updates, reboots and modifying your server settings.
The code that generates the hostnames can be found in /etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/. It concerns two files: 02ServerName and 03ServerAlias, You need to add your template after (or alter) the 26RewriteTrackAndTrace as this is responsible for the enabling the RewriteEngine and setting the RewriteRules, also make sure the rules do not conflict with the ones set in 27ManagerProxyPass as this will severely limit your functionality off the server since you will most likely unable to access your server-manager and other resources like the user-password page.