Our site contains href links to various subdomains: foo.mysite.com, bar.mysite.com. For testing purposes, I’d like to run the site on a completely different main domain name, and point to subdomains off the new domain name.
Rather than manually change all the links, I’d like to have only one version of the site with links that look like this:
<a href="foo.(window.location.hostname)/mypage?myparam=value">Link</a>
What’s the simplest syntax for doing this?
I know I could write jQuery code to hijack links, but a simpler in-link syntax would be better.
Couldn’t you use javascripts onclick event ? tpo do this :