Php-CNC with htaccess

There is a wordpress with htaccess

RewriteEngine On
RewriteBase /

RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

The i18n module is installed, which works out the language with the en subdomain. Now I have registered the com domain and assigned it as an alias to the main site, and I want to use mod_rewrite to get the en language on the com domain.

Something like that, but for some reason it doesn't work out:

RewriteCond %{HTTP_HOST} ^site.com$ [NC]
RewriteRule ^/(.*)$ http://en.site.ru/$1/ [L]

Thank you for your advice.

Author: parkerbit, 2013-09-28

2 answers

RewriteCond %{HTTP_HOST} ^site.com
RewriteRule (.*) http://en.site.ru/$1 [R=301,L]
 2
Author: NoName, 2013-09-29 01:22:37

Why is the initial slash here?

RewriteRule ^/(.*)$ http://en.site.ru/$1/ [L]

Do you have a query constantly with a slash?

 1
Author: vkovalchuk88, 2013-09-29 00:50:33