3 # Create an empty <Files> clause in a .htaccess file
5 require './apache-lib.pl';
6 $access{'global'} || &error($text{'htaccess_ecannot'});
7 &allowed_auth_file($in{'file'}) ||
8 &error($text{'htindex_ecannot'});
10 $hconf = &get_htaccess_config($in{'file'});
11 &lock_file($in{'file'});
14 # Create the directive
15 $dir = { 'type' => 1 };
17 if ($httpd_modules{'core'} >= 1.3) {
18 $dir->{'name'} = 'FilesMatch';
19 $dir->{'value'} = "\"$in{'path'}\"";
22 $dir->{'name'} = 'Files';
23 $dir->{'value'} = "~ \"$in{'path'}\"";
27 $dir->{'name'} = 'Files';
28 $dir->{'value'} = "\"$in{'path'}\"";
32 &save_directive_struct(undef, $dir, $hconf, $hconf);
34 &unlock_file($in{'file'});
37 &webmin_log("files", "create", "$in{'file'}:$in{'path'}", \%in);
38 &redirect("htaccess_index.cgi?file=".&urlize($in{'file'}));