I’m not the expert here, but it seems to me a fix for your problem is simply to refer the the anti-leech related files by path, not by url.
For example, where your script says:
why dont you try:
assuming your “exetic.com” site is hosted at the “base” of your dreamhost account, or
if set-up that way.
In other words, use the path, not the url. You will need to repeat the process for the other referenced files (leecher.html, filenotfound.html, etc.) but I believe that should fix it.