Add canonical URLs.
Redirect using JS to the correct URL.