I’m using this code in my htaccess file to only allow people that are referred from the domain of our choosing to visit our site. However, is there a way we can allow people that type in our domain, to access the site as well? (but block all other referrers?)
RewriteEngine On
RewriteCond %{HTTP_REFERER} !^http://the-ok-domain.com [NC]
RewriteCond %{HTTP_REFERER} !^http://your-domain.com [NC]
RewriteRule ^ http://the-website-of-your-choosing.com/ [L,R]
Add a blank referer check:
Also note that referers can be easily forged, so there’s no guarantee that this will be effect in preventing people from linking to your site.