follow the code:
$ER = '[\/]?([?]?pag=[a-zA-Z0-9_-]*)(&var1=[a-zA-Z0-9_-]*)?(&var2=[a-zA-Z0-9_-]*)?(&var3=[a-zA-Z0-9_-]*)?(&var4=[a-zA-Z0-9_-]*)?'; // A ER que separa as vars
$wURL = W_URL;
$http = 'http://';
if( $https || $_SERVER["SERVER_PORT"] != 80 ){
$url_site = str_replace('http:', 'https:', URL_SITE);
}else{
$url_site = URL_SITE;
}
$_save_pag = '';
//Executa o rewrite somente quando estiver definido para tal
if($doRewrite == true){
if(empty($str) && preg_match($ER,$str,$registers)){
error:
PHP Warning: preg_match (): Unknown modifier '?' in /home/sisv2/sis_adm/includes/funcoes/rewrite.func.php on line 17