Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var url = "http://website.com/#store";
- var hash = url.substring(url.indexOf("#")+1);
- if (hash == "store") {
- window.location.replace("http://store.website.com");
- } else if (window.location.href == "http://website.com") {
- window.location.replace("http://m.website.com");
- }
Add Comment
Please, Sign In to add comment