Welcome to WebmasterWorld Guest from 54.147.10.72

Forum Moderators: Ocean10000 & incrediBILL

Message Too Old, No Replies

sub-semalt

     

wilderness

2:25 am on Aug 10, 2014 (gmt 0)

WebmasterWorld Senior Member wilderness is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



anybody have a clue if this correct syntax?

#any two numbers
RewriteCond %{HTTP_REFERER} ^http://[0-9]{2}\.semalt\.com/

iamzippy

11:03 am on Aug 10, 2014 (gmt 0)

5+ Year Member



It works in Regex Buddy.
So does:

RewriteCond %{HTTP_REFERER} ^http://\d\d\.semalt\.com/

wilderness

1:01 pm on Aug 10, 2014 (gmt 0)

WebmasterWorld Senior Member wilderness is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



Many thanks

Pfui

1:53 pm on Aug 10, 2014 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member



There are assorted subdomains (e.g.: http://semalt.semalt.com/) thus --

RewriteCond %{HTTP_REFERER} semalt
RewriteRule .* - [F]

-- works for me. (Ditto for fellow pest kambasoft.)

ronin

2:24 pm on Aug 10, 2014 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'm still learning (and improving) my regex skills, but I am using this:

RewriteCond %{HTTP_REFERER} ^https?://([a-z0-9-]+\.)?semalt\.com [NC]
RewriteRule .* - [F]

not2easy

3:50 pm on Aug 10, 2014 (gmt 0)

WebmasterWorld Administrator 5+ Year Member Top Contributors Of The Month



Couldn't these be combined like we do for UAs?

RewriteCond %{HTTP_REFERER} (kambasoft|semalt|whatever) [NC]
RewriteRule .* - [F]

wilderness

4:27 pm on Aug 10, 2014 (gmt 0)

WebmasterWorld Senior Member wilderness is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



certainly.

dupres01

5:45 pm on Aug 10, 2014 (gmt 0)



which is the better form to use (and, to help with my education, why)?
this one:
RewriteCond %{HTTP_REFERER} (kambasoft|semalt|whatever) [NC]
RewriteRule .* - [F]

or this one:
RewriteCond %{HTTP_REFERER} kambasoft [NC,OR]
RewriteCond %{HTTP_REFERER} semalt [NC,OR]
RewriteCond %{HTTP_REFERER} whatever [NC]
RewriteRule .* - [F]

wilderness

5:50 pm on Aug 10, 2014 (gmt 0)

WebmasterWorld Senior Member wilderness is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



the combined line will be less server strain and slightly faster.

Both do however work.

I've one for "crawler" as well, however for simplicity sake and to possibly stop another stray bot, you could use "crawl".

lucy24

7:05 pm on Aug 10, 2014 (gmt 0)

WebmasterWorld Senior Member lucy24 is a WebmasterWorld Top Contributor of All Time Top Contributors Of The Month



The form
#any two numbers
RewriteCond %{HTTP_REFERER} ^http://[0-9]{2}\.semalt\.com/

is syntactically correct, but I suspect it's easier on the server if you simply say
^http://[0-9][0-9]\.semalt\.com

That's assuming it will always be exactly two. Otherwise of course you'd go to
[0-9]+

Or-- my preference-- \d for a savings of three bytes ;)

fwiw, mine simply says

SetEnvIf Referer semalt keep_out


It's in mod_setenvif because this rule is in my shared htaccess used by all sites. If it were for a single site it would be expressed as a RewriteCond along with assorted other referer-based lockouts.

My impression is that semalt works 100% via infected human browsers, because they always ask for favicon and stylesheet. Robots normally don't. Did anyone ever figure out what they want?
 

Featured Threads

Hot Threads This Week

Hot Threads This Month