diff --git a/.htaccess b/.htaccess
index 9566a09bf0cf5828f69c3acb53abef3dfc051a6c..1f79b511fa704c832df56bd87a079b1eeb607a99 100644
--- a/.htaccess
+++ b/.htaccess
@@ -64,5 +64,11 @@ RewriteRule . index.php [L]
 # .git doesn't exist
 RedirectMatch 404 /\\.git(/|$)
 
+# allow gathering stats only from localhost
+<Files apc_stats_r2mon.php>
+Order Allow,Deny
+Allow from 127.0.0.1
+</Files>
+
 # END noblogs