Redirect using jQuery
If you lose the HTTP_REFERER the user can't use the back-button. This is the desired effect when you want to do a redirect.
You can also use
window.location.href =., but this will allow the user to use the back button (which causes an infinite loop).
As a rule of thumb:
location.href: when you try to simulate an HTTP redirect.
location.replace. when you try to simulate a click
Full jquery redirect example
When doing SEO (Search engine optimization), you want to notify the search engines about your redirection you should add the
rel="canonical" meta tag to your website.
Adding a noscript section with an HTML refresh meta tag in it, is also a good solution.