Unstoppable Domains

[MODrewrite] Multilingual subdomains

Spaceship Spaceship
Watch

sOliver

Established Member
Impact
151
I have added a wildcard domain to redirect all subdomains.
Now I would like to use some subdomains for a multilingual system.

If the visitors enters en.domain.com I want it to fetch the content from
domain.com/category/blah/?lang=en

How would I do that ?

I can easily redirect subdomains to that domain but I got to fetch the content instead.
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
AfternicAfternic
(If you're using PHP...) $_SERVER['HTTP_HOST'] has all the data you need to manipulate URL strings.

Get the first 2 chars, maybe after shaving off the www. and then set the variable needed to those, find the language and load it.

Dan
 
0
•••
Dynadot — .com Registration $8.99Dynadot — .com Registration $8.99

We're social

Unstoppable Domains
Domain Recover
DomainEasy — Zero Commission
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back