Last active
August 29, 2015 14:00
-
-
Save bradoyler/e2241c3b0487de090be7 to your computer and use it in GitHub Desktop.
redirect to new domain using location API https://developer.mozilla.org/en-US/docs/Web/API/Window.location
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (window.location.href.indexOf('://custom.me') === 0) { | |
window.location.replace('http://projectname.io' + window.location.pathname); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment