Options -Indexes
Options +FollowSymLinks
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^([^/]+)/([^/]+)/?$ http://localhost/site/$1.php?find=$2 [L,QSA]
RewriteRule ^en/(.*)$ http://localhost/site/$1 [QSA,L]
foreach ($_SESSION['dom'] as $key=>$value)
{
if (preg_match("![0-9]{19}!",$value,$matches) AND preg_match("!^".trim($base[$i])."!",$matches[0]))
{
$str = explode(",ДОМ",$value);
$str1 = explode(",",trim($str[1]));
$doma[] = trim($str[0]);
if (!in_array($str1[2],$code))
$code[] = $str1[2];
unset($_SESSION['dom'][$key]);
}
}
$domy = implode("",$doma);
$cod = implode(",",$code);
$puts = $domy."::".$cod."::".base_convert(trim($base[$i]), 10, 36)."\n";
file_put_contents("base.dat", $puts, FILE_APPEND);
$z++;
}