regex - .htaccess regular expression syntax -
sorry bad english. exclude website every referral spam contains word "buttons" because i'm tired of "social-buttons", "buttons-for-your-website", "my-brother-buttons" ecc. can see in google analytics report. i'm not regular expression, thought of this:
rewritecond %{http_referer} ^http://([^.]+\.)(.*)(buttons|button)(.*)\.com [nc,or]
is wrong? method exclude kind of referral? didn't tested it: don't know how do. thank :)
the following block visits referrals matching button
, no need s
, regex includes (button.*
):
rewriteengine on rewritecond %{http_referer} ^http://.*button.* [nc] rewriterule (.*) http://www.goaway.com [r=301,l]
learn more mod_rewrite syntax
Comments
Post a Comment