Restrict direct access to error pages
snippet in htaccess

Restrict direct access to error pages

user8043

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^(www\.)?mydomain\.com
RewriteRule \.(html|htm)$ - [F]