Handle hostnames with upper-case letters
[webmin.git] / proc / index.cgi
1 #!/usr/local/bin/perl
2 # index.cgi
3 # Redirect to default index
4
5 require './proc-lib.pl';
6 if ($config{'default_mode'} ne "last") {
7         $idx = "index_$config{'default_mode'}.cgi";
8         }
9 elsif (open(INDEX, $index_file)) {
10         chop($idx = <INDEX>);
11         close(INDEX);
12         if (!$idx) {
13                 $idx = "index_tree.cgi";
14                 }
15         }
16 else {
17         $idx = "index_tree.cgi";
18         }
19 ($idxfn = $idx) =~ s/\?.*$//;
20 if (!-r "$module_root_directory/$idxfn") {
21         # Bogus index
22         $idx = "index_tree.cgi";
23         }
24 &redirect("/$module_name/$idx");
25