I've got a Landingpage: "https://www.example.com" and an Application: "https://app.example.com/something/" and on some user actions like logout i need to redirect the user back to the original landingpage. my hard-coded solution does work:
window.location = "https://www.example.com"
but this is bad practice and annoying in other environments like my local development(http://localhost:8082/something - for the app, no local landingpage). is there some good and easy solution to redirect to just the base-domain of my current site(example.com redirects to www.example.com by default)?