Page is a not externally linkable
g1smd - 1:11 pm on Nov 20, 2012 (gmt 0)
Internally rewrite (rather than externally redirect) to a script that serves whatever status code you require and sends out the human readable page content at the originally requested URL. This script can then also internally call the log file script.
>> RewriteCond %{HTTP_REFERER} ^http(s)?://(.*)?\.(tld|tld)(/.*)?$
http(s)? simplifies to https? The brackets are not needed on a single character.
Leading (.*)? is a problem. The * means "or zero" so the question mark is redundant. The brackets are also redundant as you're not reusing anything.
(/.*)?$ is "slash followed by something or nothing, OR nothing at all, not even a slash". Simplifies to /? and nothing else, especially not the $ anchor. Again, brackets are not required as you're not needing to capture anything for re-use.