Dynadot โ€” .com Transfer

[MODrewrite] Multilingual subdomains

SpaceshipSpaceship
Namecheap AuctionsNamecheap Auctions
Spacemail by SpaceshipSpacemail by 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.
GoDaddyGoDaddy
(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
•••
Truehost โ€” .com domains from $4.99, hosting includedTruehost โ€” .com domains from $4.99, hosting included
Escrow.com
Spaceship
Domain Recover
CryptoExchange.com
Catchy
DomDB
NameFit
  • The sidebar remains visible by scrolling at a speed relative to the pageโ€™s height.
Back