Skip to main content
Removed signature, formatting, tags.
Source Link
MrWhite
  • 43.1k
  • 4
  • 50
  • 90
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_REFERER} ^http(s)?://([^.]+\.)*tumblr\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://([^.]+\.)*nometoqueslashelveticas\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://([^.]+\.)*webnuz\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://([^.]+\.)*ihgz\.tk [NC]
RewriteRule .* - [F]
</IfModule>

I'm not particular familiar with htaccess, so hoping someone might be able to confirm/deny if this code is correct?

Simply looking to deny access to multiple spammy domains that are back linking to my posts and pages.

What confuses me is that some of the domains have different TLD's, some start with a sub domain, some are HTTP or HTTPS, www or not www, so trying to make sure that the code covers all those variables, as the examples:

http://www.ttyifu.com 
https://www.hostmds.com
http://blog.hostmds.com 
https://arsiv.pilli.com
http://green-ch.info/

Found a few examples of this code that have the OROR tag after the NCNC, so assuming this is correct, but that the last line doesn't have the OROR.

Thank you for your help, Graham

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_REFERER} ^http(s)?://([^.]+\.)*tumblr\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://([^.]+\.)*nometoqueslashelveticas\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://([^.]+\.)*webnuz\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://([^.]+\.)*ihgz\.tk [NC]
RewriteRule .* - [F]
</IfModule>

I'm not particular familiar with htaccess, so hoping someone might be able to confirm/deny if this code is correct?

Simply looking to deny access to multiple spammy domains that are back linking to my posts and pages.

What confuses me is that some of the domains have different TLD's, some start with a sub domain, some are HTTP or HTTPS, www or not www, so trying to make sure that the code covers all those variables, as the examples:

http://www.ttyifu.com 
https://www.hostmds.com
http://blog.hostmds.com 
https://arsiv.pilli.com
http://green-ch.info/

Found a few examples of this code that have the OR tag after the NC, so assuming this is correct, but that the last line doesn't have the OR.

Thank you for your help, Graham

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_REFERER} ^http(s)?://([^.]+\.)*tumblr\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://([^.]+\.)*nometoqueslashelveticas\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://([^.]+\.)*webnuz\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://([^.]+\.)*ihgz\.tk [NC]
RewriteRule .* - [F]
</IfModule>

I'm not particular familiar with htaccess, so hoping someone might be able to confirm/deny if this code is correct?

Simply looking to deny access to multiple spammy domains that are back linking to my posts and pages.

What confuses me is that some of the domains have different TLD's, some start with a sub domain, some are HTTP or HTTPS, www or not www, so trying to make sure that the code covers all those variables, as the examples:

http://www.ttyifu.com 
https://www.hostmds.com
http://blog.hostmds.com 
https://arsiv.pilli.com
http://green-ch.info/

Found a few examples of this code that have the OR tag after the NC, so assuming this is correct, but that the last line doesn't have the OR.

Source Link

Deny Multiple Spammy Domains via htaccess

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_REFERER} ^http(s)?://([^.]+\.)*tumblr\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://([^.]+\.)*nometoqueslashelveticas\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://([^.]+\.)*webnuz\.com [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://([^.]+\.)*ihgz\.tk [NC]
RewriteRule .* - [F]
</IfModule>

I'm not particular familiar with htaccess, so hoping someone might be able to confirm/deny if this code is correct?

Simply looking to deny access to multiple spammy domains that are back linking to my posts and pages.

What confuses me is that some of the domains have different TLD's, some start with a sub domain, some are HTTP or HTTPS, www or not www, so trying to make sure that the code covers all those variables, as the examples:

http://www.ttyifu.com 
https://www.hostmds.com
http://blog.hostmds.com 
https://arsiv.pilli.com
http://green-ch.info/

Found a few examples of this code that have the OR tag after the NC, so assuming this is correct, but that the last line doesn't have the OR.

Thank you for your help, Graham