I've many sites running on the located rails 3 application on apache.

They may be multi-lingual and also the domain names have been in this format www.example1.com/en , www.example2.com/p/pages/about-us , example3.located_sites.com/it/items/cars/hondas

However , each domain includes a www.example1.com domain too that simply uses the british local. Which means that there's duplicate content around the 2 version erectile dysfunction www.example1.com and www.example1.com/en etc

What's the easiest method to add the /en in to the asked for url if your local isn't specified ?

does anybody know a apache rule to get this done ? i've many sites so it has to become generic / dynamic as cant search for a particular url within the url.

Or perhaps is this best completed in my rails 3 application using a before filter ? anybody understand how ?

Thanks alot Ron

I've got a similar scenario and employ this wordpress plugin. It handles your converted routes with one default, eg

domain/someid --> english
domain/es/someid --> spanish
domain/de/someid --> german