In case of interest this is what we have chnaged for our need.
It’s a very personalized solution but perhaps of interest to others or for future features.
better-wp-security\core\class-itsec-global-settings.php:
public function write_files() {
global $itsec_globals;
if ( isset( $this->settings['write_files'] ) && $this->settings['write_files'] === true ) {
$write_files = 1;
} else {
$write_files = 0;
}
if ( ITSEC_Lib::get_server() == 'nginx' ) {
$server_file = ;
} else {
// alsur.es modified for multisite htaccess files
$site_name = get_bloginfo('name');
$site_name = str_replace(' ','', $site_name); // Quitamos espacios en blanco
$site_name = strtolower($site_name); // Ponemos en minusculas
$site_name = "_".$site_name;
$server_file = ' and .htaccess'.$site_name;
}
better-wp-security\core\class-itsec-lib.php:
public static function get_htaccess() {
global $itsec_globals;
if ( ITSEC_Lib::get_server() === 'nginx' ) {
return $itsec_globals['settings']['nginx_file'];
} else {
// alsur.es modified for multisite htaccess files
$site_name = get_bloginfo('name');
$site_name = str_replace(' ', '', $site_name); // Quitamos espacios en blanco
$site_name = strtolower($site_name); // Ponemos en minusculas
$site_name = "_".$site_name;
return ITSEC_Lib::get_home_path() . '.htaccess' .$site_name;
}
}
Each apache conf is then configured to use the renamed .htaccess file