RewriteEngine on RewriteBase / RewriteRule ^pages/([A-Za-z0-9]*)/([A-Za-z0-9]*)/?$ /index.php?dir=$1&file=$2 [L,QSA]
echo "<meta http-equiv=\"refresh\" content=\"$refresh;url=".$_SERVER['PHP_SELF']."?ver=html& rid=$rid&nocache=$nocache\"/>\n";
RewriteRule ^url/([a-z0-9]*)/([a-z0-9]*)/([a-z0-9]*)/?$ url=$1&ver=$2&rid=$3&nocache=$4 [L,QSA]
RewriteRule ^/([A-Za-z0-9]*):([A-Za-z0-9]*)/?$ /login.php?log=$1&par=$2 [L,QSA]