<IfModule mod_rewrite.c>
RewriteCond %{HTTP_HOST} ^www.domain.ru
RewriteCond %{REQUEST_URI} !1c_exchange.php
RewriteCond %{REQUEST_URI} !1c_import_xml.php
RewriteRule (.*) https://domain.ru/$1 [R=301,L]
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !/bitrix/urlrewrite.php$
RewriteRule ^(.*)$ /bitrix/urlrewrite.php [L]
RewriteRule .* - [E=REMOTE_USER:%{HTTP:Authorization}]
</IfModule>