change the subdomain and keep the rest of the url
Posted
by
MohamedKadri
on Pro Webmasters
See other posts from Pro Webmasters
or by MohamedKadri
Published on 2011-03-11T22:23:56Z
Indexed on
2011/03/12
0:18 UTC
Read the original article
Hit count: 287
Hello,
I'm working on a multilingual website, and I want to generate the links in this way:
The site is domain.tld and defaults to English,
It has some subdomains like fr.domain.tld which will be in French, de.domain.tld which will be in German, it.domain.tld which will be in Italian...
when the current page is the index, the links to other languages will be like this:
domain.tld, fr.domain.tld, de.domain.tld, it.domain.tld....
But when we are in another page like domain.tld/my-page, how do we generate the URLs to match the current page but with another subdomain/language using PHP
© Pro Webmasters or respective owner