sabotage1945
12-13-2002, 10:57 AM
Hello there,
This is my first post on this site. I've been going crazy thinking of ways to allow my website visitors go to specific pages, based on what they have typed on their URL statement.
For example:
I have registered the following URLs ALL pointing to the same IP/web server. Lets say the names are:
www.testing.com
www.testing.com.au
www.testing.co.jp
if a user comes from .com, I would like it to go to my north america page, and if they come from .con.au, I would like them to go to my English-Australian page, same goes with the Japanese domain name.
So far I have the following script in my INDEX.HTML file:
<SCRIPT>
var obj = window.top.location;
if (obj.href.indexOf("test.com.au")==(-1)) {
obj.href = 'jp/welcome_jp.htm';
} else {
obj.href = 'en/welcome_auen.htm';
}
</SCRIPT>
However, if a user comes from test.com the script goes to a 404-page. But it would be nice if it could go to welcome_usen.htm as an example.
Thank you for your help and recommendations.
Kindest regards,
Sab
This is my first post on this site. I've been going crazy thinking of ways to allow my website visitors go to specific pages, based on what they have typed on their URL statement.
For example:
I have registered the following URLs ALL pointing to the same IP/web server. Lets say the names are:
www.testing.com
www.testing.com.au
www.testing.co.jp
if a user comes from .com, I would like it to go to my north america page, and if they come from .con.au, I would like them to go to my English-Australian page, same goes with the Japanese domain name.
So far I have the following script in my INDEX.HTML file:
<SCRIPT>
var obj = window.top.location;
if (obj.href.indexOf("test.com.au")==(-1)) {
obj.href = 'jp/welcome_jp.htm';
} else {
obj.href = 'en/welcome_auen.htm';
}
</SCRIPT>
However, if a user comes from test.com the script goes to a 404-page. But it would be nice if it could go to welcome_usen.htm as an example.
Thank you for your help and recommendations.
Kindest regards,
Sab