RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST} !^www\.site\.ru [NC]
RewriteRule (.*) http://www.site.ru/$1 [R=301,L,NE]
RewriteRule ^company/([^/]*)\.html$ /company.html?name=$1 [L]
# The Friendly URLs part
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1