I'm trying to add languages to my wordpress website. For this I'm using "qTranslate X" plugin in "per domain" mode.
It should work as follows:
http://domain.com - main language
http://en.domain.com - english
etc...
What I need is to redirect all requests from subdomain to main domain. The rest will be done by the plugin.
Example:
http://en.domain.com/category/article
should be redirected to
http://domain.com/category/article
I modified main .htaccess WP file
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^en\.domain\.com [NC]
RewriteRule ^(.*)$ http://domain.com/$1 [R=301,L]
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
But, unfortunately, it works only for the home page (i.e. http://en.domain.com). When I type http://en.domain.com/category/article I see 404 Not Found page.
Thanks for any help!