Is it possible to make redirect depending on language?

I want to make redirect from my website to two different websites depending on user’s language.

Yeah, I do this for doesmysiteneedhttps.com:

	redir {
		if {>Accept-Language} has nl
		/ https://heeftmijnwebsitehttpsnodig.nl
	}
	redir {
		if {>Accept-Language} has fr
		/ https://faut-il-https-sur-mon-site.fr
	}
	redir {
		if {>Accept-Language} has pt
		/ https://meusiteprecisadehttps.com.br/
	}
	redir {
		if {>Accept-Language} has jp
		/ https://xn--https-u63dqd1e1cw548d366d.jp/
	}

This is obviously not perfect… since there are some nuances to Accept-Language that this does not follow. I’ve been thinking a simple plugin to do this logic would be a good idea, but never got the time to write it…

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.