detect bad cononical urls and swap in location.href