Redirecting old URLs to new subdomain using JS