Handle hostnames with upper-case letters
[webmin.git] / apache / save_htaccess.cgi
1 #!/usr/local/bin/perl
2 # save_htaccess.cgi
3 # Save some kind of per-directory options file
4
5 require './apache-lib.pl';
6 &ReadParse();
7 $access{'global'} || &error($text{'htaccess_ecannot'});
8 $access_types{$in{'type'}} ||
9         &error($text{'etype'});
10 &allowed_auth_file($in{'file'}) ||
11         &error($text{'htindex_ecannot'});
12 $conf = &get_htaccess_config($in{'file'});
13 @edit = &editable_directives($in{'type'}, 'htaccess');
14
15 &lock_file($in{'file'});
16 &error_setup(&text('efailed', $text{"type_$in{'type'}"}));
17 &parse_inputs(\@edit, $conf, $conf);
18 &unlock_file($in{'file'});
19 &webmin_log("htaccess", $in{'type'}, $in{'file'}, \%in);
20
21 &redirect("htaccess_index.cgi?file=".&urlize($in{'file'}));