質問

I have a site that is translated in 18 languages (with 18 translated domains). It also has dynamic content based on language, i.e. different products some of which are only available in specific languages. While there is a language selector and people can use that to switch language and thus site, the chances of the guy finding the language selector in a language he doesn't know are not too high. This is vital to solve, especially with paid ad traffic which is being wasted if not handled.

I use Akamai as a CDN and wanted to do the detection and redirection in JS and ideally on the Edge Server layer so it's not another call that has to go back to the origin server. After going through all of their documentation, configuration options in their UI, etc. I didn't see a way to do this.

While I did get with my Akamai representative and worked with one of their engineers to come up with a solution, I don't know if it's the best one and am open to other solutions.

役に立ちましたか?

解決

Akamai has a service called (last I checked) "Content Targeting", formerly "Edgescape". At the edge, Edgescape adds a layer-7 (http) header called "x-akamai-edgescape" to every incoming request and provides numerous bits of information about the end user:

City, State, Country, Zip, Area code, ISP, ISP throughput (DSL, satellite), ... and many more.

Once you've got that information being added to the request header, you -- the origin server -- can make decisions based on that info e.g. if country=ES, redirect to spanish.yourdomain.com. OR you can have Akamai make those decisions with edge logic. Their servers can read the incoming HTTP header with the country value and create the redirect on the edge. They can even add a cookie value that specifies which site to hit on subsequent requests. The cookie stuff just depends on your preferences and desired application behavior.

If you have access to the Akamai customer portal, look for Edgescape documentation and for ACO (Advanced Cache Optimization -- the ability to read headers/cookies and make decisions based on them).

Good luck.

p.s. Edgescape and ACO are additional modules from Akamai, BUT you might already have them OR be able to get them added at little or no cost as part of a contract renewal.

他のヒント

While not in the UI itself, there is a way to do this that they have set up. You give them a domain mapping against the accept-language header (yes I do think it's best to use accept-language as all I'm going to change on the site is language and language dependent settings) and an engineer on their end will configure it to automatically redirect, at the Edge, to the right domain based on that header. Plus they'll give the guy a cookie to detect that they redirected him. That way if he uses the language selector or follows another language specific link it doesn't automatically redirect him again, but now lets him go where he wants - so it doesn't force the option on him.

Apparently the only down side is that if I need to change it then I have to go back through everything to get it fixed instead of being able to do it myself - unless I'm forgetting something.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top