I have main site created in wordpress on domain mysite.com (multi language site).
By default mysite.com opens in local language not english. I have registered local domain to be redirected to mysite.com.
mysite.local -> mysite.com (this is fine)
But I want to redirect mysite.com to mysite.com/en for international users. If they type address mysite.com in browser or open from google I want the user to be redirected to /en version of the page.
Is it possible to achieve this with apache .htaccess, because I have shared hosting with htaccess only?
You can achieve this which the following .htaccess rules -
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www.)?example.com$
RewriteCond %{REQUEST_URI} !^/en/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /en/$1
RewriteCond %{HTTP_HOST} ^(www.)?example.com$
RewriteRule ^(/)?$ en/index.html [L]