DirectoryIndex index.php
RewriteEngine On
RewriteRule
^(([0-9]+).)?([a-zA-Z0-9_-]+).(wml|html|xhtml)$
index.php?%{QUERY_STRING}&id=$2&m=$3&version=$4
[L]
RewriteRule ^(p([0-9]+).)?([a-zA-Z0-9_-]+).(wml|html|xhtml)$
index.php?%{QUERY_STRING}&page=$2&m=$3&version=$4 [L]