0
votes

Search all internet, try many redirect versions, but no one works for my wordpress site.

Ok! I have 3 domains:

  • www.domain1.lv (this is a default domain)
  • www.domain2.eu (these two are new domains)
  • www.domain3.eu

When i go to domain1 it opens http://www.domain1.lv/lat/ (default language page). So, when i go to domain2 or domain3 i want that it opens http://www.domain2or3.eu/eng/ (english site version). If it not possible, it can redirect to http:// www.domain1.lv/eng/

At the moment, when i open new links, it redirects to default domain with some strange random page in it..

My .htaccess file:

RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]

# uploaded files
RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]

# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule  ^[_0-9a-zA-Z-]+/(wp-(content|admin|includes).*) $1 [L]
RewriteRule  ^[_0-9a-zA-Z-]+/(.*\.php)$ $1 [L]
RewriteRule . index.php [L]
1

1 Answers

0
votes

In your domain 2 or domain 3 htaccess, put

     Redirect 301 / http://www.domain2or3.eu/eng/