Site 1
Site 1 English
Site 1 German
Site 2
Site 2 English
Site 2 German
I have a third party component which allows me to retrieve the visiting users country and redirect them to their country's site. So if a user visited site 1 and they're from USA I could redirect them to the English version but if the user is from Germany I would like to redirect them to Germany's site.
Where would the appropriate place be to add this code?
Hi Colin,
In my persional experiance I do this in DefaultController which catches the request before Umbraco. You can check there the country and redirect the user to the correct language version. A good strarting point is the official Umbraco documentation here.
I'm not using MVC unfortunately. As I understand I would need to create or change the Global.asax file. Is this on the correct lines? If so any examples I could follow to ensure I don't break the existing functionality or cause a random bug?
Where to add custom redirect
Hi
My Umbraco structure is as follows
I have a third party component which allows me to retrieve the visiting users country and redirect them to their country's site. So if a user visited site 1 and they're from USA I could redirect them to the English version but if the user is from Germany I would like to redirect them to Germany's site.
Where would the appropriate place be to add this code?
Thanks
Hi Colin, In my persional experiance I do this in DefaultController which catches the request before Umbraco. You can check there the country and redirect the user to the correct language version. A good strarting point is the official Umbraco documentation here.
Hi Mila
I'm not using MVC unfortunately. As I understand I would need to create or change the Global.asax file. Is this on the correct lines? If so any examples I could follow to ensure I don't break the existing functionality or cause a random bug?
Thanks
Anyone with any ideas?
is working on a reply...