diff --git a/modules/gallery/helpers/access.php b/modules/gallery/helpers/access.php
index 62e4e10a6..7be6b3e0c 100644
--- a/modules/gallery/helpers/access.php
+++ b/modules/gallery/helpers/access.php
@@ -695,7 +695,7 @@ static function update_htaccess_files($album, $group, $perm_name, $value) {
$fp = fopen("$dir/.htaccess", "w+");
fwrite($fp, "\n");
fwrite($fp, " RewriteEngine On\n");
- fwrite($fp, " RewriteRule (.*) $base_url/\$1 [L]\n");
+ fwrite($fp, " RewriteRule (.*) $base_url/\$1 [B,L]\n");
fwrite($fp, "\n");
fwrite($fp, "\n");
fwrite($fp, " Order Deny,Allow\n");