Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

111
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!