Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

129
Visualizações
Domain redirects Apache htaccess

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?

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

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]
over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda