Search code examples
wordpressapachenginxhttp-redirectmultilingual

Link domain to multilangual website


I want to create domain names for different country's and link them to my wordpress website redirecting to the right language.

So my question is: How can I link my domain name somedomain.it to somedomain.com/it?

I am using a wordpress website, currently hosted at hostgator. The website handles the multilangual support trough weglot.

I hope someone has any idea how to make this work or got an alternative option.

Thanks in advance! - Tjeu


Solution

  • Got it working with apache!

    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^ somedomain\.it$ [NC]
    RewriteRule ^(.*)$ http://www.somedomain.com/it/$1 [R=301,L]