• Dear WP’ers,

    Recently I recognized spam activity on my site. I begon reading how to get rid of it. I have to change my .htaccess via FTP. Now I also read about the sensitivity of this file. Could you please check for my whether the new code I written is okay or not? I also enclosure the original code from WP.

    WP code

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress

    New code

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*4webmasters\.org.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*7makemoneyonline\.com.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*abovetherivernc\.com.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*addons\.mozilla\.org/en-US/firefox/addon/ilovevitaly/ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*adelly\.bg.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*advokateg\.(com?|ru).*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*alessandraleone\.com.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*hol\.es.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*anticrawler\.org.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*aosheng\-tech\.com.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*audiobangout\.com.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*backgroundpictures\.net.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*bbtec\.net.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*best\-seo\-offer\.com.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*best\-seo\-solution\.com.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*bestwebsitesawards\.com.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*bkns\.vn.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*blackhatworth\.com.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*buttons\-for\-your\-website\.com.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*buttons\-for\-website\.com.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*buy\-cheap\-online\.info.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*buypharmacydrug\.com.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*cenoval\.ru.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*callejondelpozo\.es.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*cbcseward\.com.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*cherrypointplace\.ca.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*cherubinimobili\.it.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*clmforexeu\.com.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*constantaservice\.net.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*darodar\.com.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*econom\.co.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*edelstahlschornstein\-123\.de.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*embedle\.com.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*event\-tracking\.com.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*extener\.com.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*family1st\.ca.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*fbfreegifts\.com.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*feedouble\.(com?|net).*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*forum20.smailik\.org.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*foxtechfpv\.com.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*ftns\.ru*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*free\-share\-buttons\.com.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*free\-social\-buttons\.com.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*freeseedsonline\.com.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*fungirlsgames\.net.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*funnypica\.com.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*guardlink\.(com?|org).*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*get\-free\-traffic\-now\.com.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*googlsucks\.com.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*gototal\.co.nz.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*h2monline\.com.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*hostcritique\.com.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*hostingclub\.lk.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*houseofrose\.com.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*hulfingtonpost\.com.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*humanorightswatch\.org.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*ilovevitaly\.(com?|ru|org|info).*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*iminent\.com.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*invivo\.hu.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*istanbulit\.com.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*itronics\.ca.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*itsdp3\.com.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*jasonpartington\.com.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*joinandplay\.me.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*joingames\.org.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*kabbalah\-red\-bracelets\.com.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*kambasoft\.com.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*kosova\.de.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*leadwayau\.com.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*lmrauction\.com.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*lol\-smurfs\.com.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*lumb\.co.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*mainlinehobby\.net.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*make\-money\-online\.7makemoneyonline\.com.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*malls\.com.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*maxthon\.com.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*medi\-fitt.hu.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*medicovi\.com.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*medispainstitute\.com.au.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*mericanmopedstore\.com.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*motion\-interactive\.com.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*mountainstream.ms.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*musicas.baixar\-musicas\-gratis\.com.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*musicprojectfoundation\.com.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*myprintscreen\.com.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*notaria\-desalas\.com.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*noumeda\.com.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*offers\.bycontext\.com.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*openfrost\.com.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*o\-o\-6\-o\-o\.com.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*openmediasoft\.com.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*priceg\.com.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*princeadvantagesales\.com.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*pyrodesigns\.com\.au.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*ranksonic\.info.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*realting-moscow\.ru.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*retreatia\.com.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*aliexpress\.com.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*savetubevideo\.com.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*semalt\.com.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*seoanalyses\.com.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*setioweb\.com.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*simple\-share\-buttons\.com.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www1?\.)?.*social\-buttons\.com.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*softomix\.(com?|ru|org|net).*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*sonyelektronik\.com.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*soundfrost\.org.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*srecorder\.com.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*streha\-metalko.si.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*susanholtphotography\.com.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*tastyfoodideas\.com.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*teastory\.co.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*thecoral\.com.br.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*theguardlan\.com.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*thepokertimer\.com.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*touchmods\.fr.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*twincitiescarservice\.com.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*urlopener\.blogspot\.com.au.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*uzungil\.com.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*vapmedia\.org.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*videofrost\.(com?|net).*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*website\-errors\-scanner\.com.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*webmaster\-traffic\.com.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*williamrobsonproperty\.com.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*xn--c1acygb\.xn--p1ai.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*xn--q1a\.xn--b1aube0e\.xn--c1acygb\.xn--p1ai.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*uni\.me.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*youtubedownload\.org.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*zazagames\.org.*$ [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http(s)?://(www\.)?.*zverokruh\-shop\.cz.*$ [NC]
    RewriteRule . /index.php [L]
    </IfModule>
    
    <IfModule mod_setenvif.c>
    
    SetEnvIfNoCase Referer 4webmasters.org spambot=yes
    SetEnvIfNoCase Referer 7makemoneyonline.com spambot=yes
    SetEnvIfNoCase Referer acunetix-referrer.com spambot=yes
    SetEnvIfNoCase Referer adcash.com spambot=yes
    SetEnvIfNoCase Referer advokateg.com spambot=yes
    SetEnvIfNoCase Referer advokateg.ru spambot=yes
    SetEnvIfNoCase Referer baixar-musicas-gratis.com spambot=yes
    SetEnvIfNoCase Referer best-seo-offer.com spambot=yes
    SetEnvIfNoCase Referer best-seo-solution.com spambot=yes
    SetEnvIfNoCase Referer bestwebsitesawards.com spambot=yes
    SetEnvIfNoCase Referer blackhatworth.com spambot=yes
    SetEnvIfNoCase Referer buttons-for-website.com spambot=yes
    SetEnvIfNoCase Referer buttons-for-your-website.com spambot=yes
    SetEnvIfNoCase Referer buy-cheap-online.info spambot=yes
    SetEnvIfNoCase Referer cenokos.ru spambot=yes
    SetEnvIfNoCase Referer cenoval.ru spambot=yes
    SetEnvIfNoCase Referer cityadspix.com spambot=yes
    SetEnvIfNoCase Referer darodar.com spambot=yes
    SetEnvIfNoCase Referer descargar-musicas-gratis.com spambot=yes
    SetEnvIfNoCase Referer econom.co spambot=yes
    SetEnvIfNoCase Referer edakgfvwql.ru spambot=yes
    SetEnvIfNoCase Referer event-tracking.com spambot=yes
    SetEnvIfNoCase Referer fbdownloader.com spambot=yes
    SetEnvIfNoCase Referer forum20.smailik.org spambot=yes
    SetEnvIfNoCase Referer free-share-buttons.com spambot=yes
    SetEnvIfNoCase Referer free-social-buttons.com spambot=yes
    SetEnvIfNoCase Referer googlsucks.com spambot=yes
    SetEnvIfNoCase Referer gobongo.info spambot=yes
    SetEnvIfNoCase Referer guardlink.org spambot=yes
    SetEnvIfNoCase Referer hulfingtonpost.com spambot=yes
    SetEnvIfNoCase Referer humanorightswatch.org spambot=yes
    SetEnvIfNoCase Referer iedit.ilovevitaly.com spambot=yes
    SetEnvIfNoCase Referer ilovevitaly.com spambot=yes
    SetEnvIfNoCase Referer ilovevitaly.co spambot=yes
    SetEnvIfNoCase Referer ilovevitaly.info spambot=yes
    SetEnvIfNoCase Referer ilovevitaly.org spambot=yes
    SetEnvIfNoCase Referer ilovevitaly.ru spambot=yes
    SetEnvIfNoCase Referer iskalko.ru spambot=yes
    SetEnvIfNoCase Referer lomb.co spambot=yes
    SetEnvIfNoCase Referer luxup.ru spambot=yes
    SetEnvIfNoCase Referer make-money-online.7makemoneyonline.com spambot=yes
    SetEnvIfNoCase Referer maps.ilovevitaly.com spambot=yes
    SetEnvIfNoCase Referer myftpupload.com spambot=yes
    SetEnvIfNoCase Referer net.hts.ru spambot=yes
    SetEnvIfNoCase Referer offers.bycontext.com spambot=yes
    SetEnvIfNoCase Referer o-o-6-o-o.ru spambot=yes
    SetEnvIfNoCase Referer o-o-6-o-o.com spambot=yes
    SetEnvIfNoCase Referer o-o-8-o-o.ru spambot=yes
    SetEnvIfNoCase Referer priceg.com spambot=yes
    SetEnvIfNoCase Referer resellerclub.com spambot=yes
    SetEnvIfNoCase Referer responsinator.com spambot=yes
    SetEnvIfNoCase Referer годом.рф spambot=yes
    SetEnvIfNoCase Referer savetubevideo.com spambot=yes
    SetEnvIfNoCase Referer screentoolkit.com spambot=yes
    SetEnvIfNoCase Referer semalt.com spambot=yes
    SetEnvIfNoCase Referer seoexperimenty.ru spambot=yes
    SetEnvIfNoCase Referer shopping.ilovevitaly.ru spambot=yes
    SetEnvIfNoCase Referer simple-share-buttons.com spambot=yes
    SetEnvIfNoCase Referer slftsdybbg.ru spambot=yes
    SetEnvIfNoCase Referer socialseet.ru spambot=yes
    SetEnvIfNoCase Referer social-buttons.com spambot=yes
    SetEnvIfNoCase Referer srecorder.com spambot=yes
    SetEnvIfNoCase Referer st3.cwl.yahoo.com spambot=yes
    SetEnvIfNoCase Referer superiends.org spambot=yes
    SetEnvIfNoCase Referer theguardlan.com spambot=yes
    SetEnvIfNoCase Referer vodkoved.ru spambot=yes
    SetEnvIfNoCase Referer websocial.me spambot=yes
    SetEnvIfNoCase Referer www1.social-buttons.com spambot=yes
    SetEnvIfNoCase Referer www.Get-Free-Traffic-Now.com spambot=yes
    SetEnvIfNoCase Referer ykecwqlixx.ru spambot=yes
    SetEnvIfNoCase Referer yougetsignal.com spambot=yes
    
    </IfModule>
    
    <IfModule mod_authz_host.c>
    
    Order allow,deny
    Allow from all
    Deny from env=spambot
    
    </IfModule>
    
    # END WordPress

    Thank you in advance!

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘.htaccess deny spambots’ is closed to new replies.