Есть сайт на Апаче 2
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName www.mc-om.ru
DocumentRoot /var/www/site/mc-om.ru/www
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/site/mc-om.ru/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride All
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
ServerName www.mc-om.ru
RewriteEngine On
RewriteCond %{HTTP_HOST} ^mc-om.ru
RewriteRule (.*) http://www.mc-om.ru/$1 [R=301,L]