Forum Moderators: phranque
1.
# BLOCK HOME PAGE (/index.html) FROM FAKE SELF-REFERRALS
<Files /index.html>
RewriteCond %{HTTP_REFERER} example\.com/?$
RewriteRule .* - [F]
</Files>
2.
# BLOCK HOME PAGE (/) FROM FAKE SELF-REFERRALS
<Files />
RewriteCond %{HTTP_REFERER} example\.com/?$
RewriteRule .* - [F]
</Files>
Usually a site has a link to its home page on the logo, like this site. What if someone clicked on that? The user would be blocked on the subsequent page view.
Usually a site has a link to its home page on the logo, like this site
RewriteRule ^$ - [F] RewriteCond %{HTTP_REFERER} example\.com/?$ RewriteCond %{HTTP_REFERER} ^http://www\.example\.com [NC,OR]
1.
# BLOCK HOME PAGE (/index.html) FROM FAKE SELF-REFERRALS
<Files /index.html>
RewriteCond %{HTTP_REFERER} example\.com/?$
RewriteRule ^$ - [F]
</Files>
2.
# BLOCK HOME PAGE (/) FROM FAKE SELF-REFERRALS
<Files />
RewriteCond %{HTTP_REFERER} example\.com/?$
RewriteRule ^$ - [F]
</Files>
RewriteCond %{HTTP_REFERER} ^http://(www\.)?example\.com(/(index\.html)?)?$
RewriteRule ^(index\.html)?$ - [F]