.htaccess - htaccess block referers with keyword -


i have site getting hit had referer spam sites domain always:

http://scanner-{somethin-unique-here}.top 

how can use htaccess file block referers scanner-xxx.top?

in site root .htaccess can use rule based on http_referer variable block remember sites can change http_referer @ point well:

rewriteengine on  rewritecond %{http_referer} https?://scanner-.*\.top [nc]  rewriterule ^ - [f] 

make sure rule right @ top first rule.


Comments

Popular posts from this blog

java - Jasper subreport showing only one entry from the JSON data source when embedded in the Title band -

serialization - Convert Any type in scala to Array[Byte] and back -

SonarQube Plugin for Jenkins does not find SonarQube Scanner executable -