Sometime when we need to block bad word or filthy words we need to install plugin, module and etc. Or sometime we spent money to block all bad word.
from what I know most of the bad word comes from bad bot. Sometime from google, bing or yahoo search query (HTTP_REFERER). to prevent bad bot come to your site you can refer my article here and check bad user agent on project honey pot or like this.


 RewriteCond %{HTTP_USER_AGENT} ^$ [OR]  
 RewriteCond %{HTTP_USER_AGENT} ^(java|curl|wget) [NC,OR]  
 RewriteCond %{HTTP_USER_AGENT} (winhttp|HTTrack|clshttp|archiver|loader|email|harvest|extract|grab|miner|Ezooms|Load_Impact) [NC,OR]  
 RewriteCond %{HTTP_USER_AGENT} (libwww-perl|curl|wget|python|nikto|scan|webOS|Exabot|InAGist|UnwindFetchor|NING) [NC,OR]  
 RewriteCond %{HTTP_USER_AGENT} (<|>|’|%0A|%0D|%27|%3C|%3E|%00) [NC]  
 RewriteRule ^(.*)$ - [F]  

above code also prevents empty user agent come to your site
This i will show you how to block bad query on your site.


 ## I removed some common words, tweak to your liking  
 ## This code uses PCRE and works only with Apache 2.x.  
 ## This code will NOT work with Apache 1.x servers.  
 RewriteCond %{QUERY_STRING} \b(ambien|blue\spill|cialis|cocaine|ejaculation|erectile|christian)\b [NC,OR]  
 RewriteCond %{QUERY_STRING} \b(erections|hoodia|huronriveracres|impotence|levitra|boob|boobs|libido|porn|p.o.r.n|fuck|ass|kamagra)\b [NC,OR]  
 RewriteCond %{QUERY_STRING} \b(lipitor|phentermin|pro[sz]ac|sandyauer|tramadol|troyhamby)\b [NC,OR]  
 #Malaysian bad word. you can delete or left it here  
 RewriteCond %{QUERY_STRING} \b(burit|gampang|butuh|pantat|cipap|brekmok|pelir|bodoh|sial|sialan|tetek|jubo)\b [NC,OR]  
 RewriteCond %{QUERY_STRING} \b(ultram|unicauca|valium|viagra|vicodin|xanax|ypxaieo|sex|warez|blackjack|casino|poker)\b [NC]  
 ## Note: The final RewriteCond must NOT use the [OR] flag.  
 RewriteRule .* - [F]  

Here I will show you how to block bad word from http referer come to your site. And you can check on redbot.org when it done. Be carefull to use this. To get bad http referer you can refer comment spammer key word on project honey pot.


 RewriteCond %{HTTP_REFERER} ^.*(ambien|blue\spill|cialis|cocaine|ejaculation|erectile|christian) [NC,OR]  
 RewriteCond %{HTTP_REFERER} ^.*(erections|hoodia|huronriveracres|impotence|levitra|boob|boobs|libido|porn|p.o.r.n|fuck|ass|kamagra) [NC,OR]  
 RewriteCond %{HTTP_REFERER} ^.*(lipitor|phentermin|pro[sz]ac|sandyauer|tramadol|troyhamby) [NC,OR]  
 #Malaysian bad word. you can delete or left it here  
 RewriteCond %{HTTP_REFERER} ^.*(burit|gampang|butuh|pantat|cipap|brekmok|pelir|bodoh|sial|sialan|tetek|jubo) [NC,OR]  
 RewriteCond %{HTTP_REFERER} ^.*(ultram|unicauca|valium|viagra|vicodin|xanax|ypxaieo|sex|warez|blackjack|casino|poker) [NC]  
 ## Note: The final RewriteCond must NOT use the [OR] flag.  
 RewriteRule .* - [F]  

* REMEMBER
-If you block "ass" you will block "bass,bassist,assingment" to. example,
HTTP_REFERER=http://www.google.com/search?q=php+assingment
29 Mar 2013

0 comments:

Post a Comment

We are not responsible for comments expressed within this site. It is the account holder's personal views and all risks of comments posted his own account owner's responsibility. Comments wisely as it showed your maturity.

:) :)) ;(( :-) =)) ;( ;-( :d :-d @-) :p :o :>) (o) [-( :-? (p) :-s (m) 8-) :-t :-b b-( :-# =p~ $-) (b) (f) x-) (k) (h) (c) cheer
Click to see the code!
To insert emoticon you must added at least one space before the code.

Recent Comments

 
Top