From: Daniel Knittl-Frank Date: Wed, 4 Apr 2012 07:10:36 +0000 (+0200) Subject: Forbid web spiders/bots to crawl 'blame' and other views in gitweb X-Git-Url: https://repo.or.cz/w/girocco.git/commitdiff_plain/51ea492e6c4f09b0aa2475e8374f613a42cad4ba Forbid web spiders/bots to crawl 'blame' and other views in gitweb Original-author: Petr Baudis --- diff --git a/htaccess b/htaccess index c9f8235..b2e85cc 100644 --- a/htaccess +++ b/htaccess @@ -8,6 +8,9 @@ RewriteCond %{QUERY_STRING} a=(blame|blob_plain|blobdiff|diff|snapshot|commitdif RewriteCond %{QUERY_STRING} a=log.*f= RewriteRule .* - [F,L] +RewriteCond %{HTTP_USER_AGENT} ([sS]lurp|[bB]ot|[sS]pider) +RewriteRule /(blame|blob_plain|blobdiff|diff|snapshot|commitdiff|history|shortlog)/ - [F,L] + RewriteBase / RewriteCond %{HTTP_USER_AGENT} ([sS]lurp|[bB]ot|[sS]pider) RewriteCond %{QUERY_STRING} (.*h=.*;)hb=[^;]*(.*)