RewriteEngine on

RewriteRule ^(discussions|register|login|account|submit|contact|about|rules|legal)$ $1.php [NC,L]
RewriteRule ^(post|category|discussion|user|confirm)/([\d]+)$ $1.php?id=$2 [NC,L]
RewriteRule ^(post|user)/([\d]+)/([-\w]+)$ $1.php?id=$2&section=$3 [NC,L]
RewriteRule ^(edit|delete)/([-\w]+)/([\d]+)$ $1.php?section=$2&id=$3 [NC,L]
RewriteRule ^(account|edit)/([-\w]+)$ $1.php?section=$2 [NC,L]
RewriteRule ^(account|edit)/([-\w]+)/([-\w]+)$ $1.php?section=$2&subsection=$3 [NC,L]
RewriteRule ^search/([-\w]+)/([-\w]+)$ search.php?section=$1&keyword=$2 [NC,L]