HEX
Server: Apache/2.4.65 (Debian)
System: Linux kubikelcreative 5.10.0-35-amd64 #1 SMP Debian 5.10.237-1 (2025-05-19) x86_64
User: www-data (33)
PHP: 8.4.13
Disabled: NONE
Upload Files
File: //usr/local/usermin-1.823/htaccess/create_files.cgi
#!/usr/bin/perl
# create_files.cgi
# Create an empty <Files> clause in a .htaccess file

require './htaccess-lib.pl';
&ReadParse();
$lref = &read_file_lines($in{'file'});
if ($in{'regexp'}) {
	if ($httpd_modules{'core'} >= 1.3) {
		$newdir = "<FilesMatch \"$in{'path'}\">";
		$enddir = "</FilesMatch>";
		}
	else {
		$newdir = "<Files ~ \"$in{'path'}\">";
		$enddir = "</Files>";
		}
	}
else {
	$newdir = "<Files \"$in{'path'}\">";
	$enddir = "</Files>";
	}
push(@$lref, $newdir);
push(@$lref, $enddir);
&flush_file_lines();
&redirect("htaccess_index.cgi?file=".&urlize($in{'file'}));