Discussion Locked

Redirect domain names

0 helpful
6 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I have added a domain name to an existing one. Which means that if you type either name in the browser they pull up the same index.html. What I want is to have the names to be redirected to two separate home pages. I understand that there can not betwo index.html pages. I have seen VBScript that redirects based on browser version. Can someone help me to put in place the code to do this. The domain names are www.getyourmoney.org and www.humantraining.net.
Thank you.

6 replies

by sevan_b2

well, the url passed to your document contains the hostname as part of it, so you can check the hostname portion of the url and redirect to different places using server-side (CGI) or client-side(JS,VBS) scripting...

by byg mony

need to have the client side JS/VBS scripting. I am a little week in JS/VBS scripting.

by byg mony

If at all possible could the someone included the actual code some I can change it to fit my needs.

Thanks

by sevan_b2

well...
in Jscript most browsers usually set location.host to the hostname contained in location.href, which is actually the full url of the document.

Therefor putting the following somewhere in the header of your document shall do the trick:----start copying from the line below---

----end copying at the line above---

This discussion is closed to new replies.