I think some people used to move their out.php into its own folder and then put an htaccess like this in the folder.
AuthUserFile /dev/null
AuthGroupFile /dev/null
RewriteEngine On
RewriteCond %{HTTP_REFERER} !^
http://yourdomain.com [NC]
RewriteCond %{HTTP_REFERER} !^
http://www.yourdomain.com [NC]
RewriteRule /*
http://www.yourdomain.com/error.html [R,L]
you just have to change the include line on your main page to point into this folder.