ino
ino

Reputation: 273

How do I redirect a multi language site to a default language page?

I have this:

http://example.com/EN/index.php - english version

http://example.com/PT/index.php - portuguese version

What I want: http://example.com/ to be taken to the portuguse page by default.


I've also been thinking on having the portuguese page on the root and english in the EN/ directory. is this better for SEO?

Upvotes: 0

Views: 812

Answers (1)

homelessDevOps
homelessDevOps

Reputation: 20726

iam not sure if i understand the problem, but you can create an index.php in your root and change the header to forward the user to the PT/index.php

Header("Location: ./PT/index.php");

later you can construct an if/else check to verify the language of the browser etc..

Upvotes: 1

Related Questions