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

106
Visualizações
htaccess with two indexes for locales

I am using Reactjs client-side, and I have two indexes index.html and indexAR.html I am doing it for SEO for every language make an index.

URL example: example.com/ar/{pages}

URL example: example.com/en/{pages}

so I need to tell the HTTP server if find ar in URL returns indexAR.html if anything else returns index.html

#.htaccess

Options -Indexes
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.html?path=$1 [NC,L,QSA]
over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

Have your htaccess rules file in following manner. make sure your htaccess rules file is present along with ar, en folders(not inside them, besides them).

Make sure to clear your browser cache before testing your URLs.

RewriteEngine ON
Options -Indexes

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ar indexAR.html [NC,L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/?$ index.html?path=$1 [NC,L,QSA]
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