$file_path = "your_file";
$file_handle = fopen($file_path, "rb");
$i = 0;
while (!feof($file_handle)) {
$symbol = fread($file_handle, 1);
$i++;
}
echo 'total byte = '. $i."\n";
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]*)$ index.php?name=$1 [L,QSA]
# и тд если надо
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]*)/([^/]*)$ index.php?name=$1&sub_name=$2 [L,QSA]