JavaScript: redirect to another host if URL contains a specific text