URL Redirection

liunx

Guest
Hi,<br />
<br />
I hv 2 domains; lets say abc.com and def.com. My main site is at abc.com . Now I wish that whenever ( and if any) user goes to other domain (def.com) then the visitor should automatically be redirected to index.html page of abc.com. <br />
<br />
I am looking for some general script which work on all the normal kind of broswers used by people nowadays, with as well as without Java capibility,<br />
<br />
Pls help & guide.<!--content-->You say that you don't want a Javascript solution for this... yet you double-posted this question and your answer (a non-javascript solution) is in the Javascript forum:<br />
<br />
<!-- m --><a class="postlink" href="http://forums.webdeveloper.com/showthread.php?s=&threadid=6038">http://forums.webdeveloper.com/showthre ... eadid=6038</a><!-- m --><br />
<br />
Please don't double-post. It breaks-up the answers.<br />
k<!--content-->typically this is done in this way,<br />
a link that points to your index page and some javascript code for automatic redirection.<br />
<br />
put this code in between the head tags of the page from where you want to be redirected.<br />
<br />
<script type="text/javascript"><br />
window.location.href = <!-- m --><a class="postlink" href="http://www.webdeveloper.com/forum/archive/index.php/">http://www.webdeveloper.com/forum/archive/index.php/</a><!-- m -->"http://www.abcd.com/index.html"<br />
</script><br />
<br />
and in the body section put this line<br />
<br />
<a href = <!-- m --><a class="postlink" href="http://www.webdeveloper.com/forum/archive/index.php/">http://www.webdeveloper.com/forum/archive/index.php/</a><!-- m -->"http://www.abcd.com/index.html">abcd home</a><br />
<br />
<br />
Now if the browser suports javascript the user will beimmidiately redirected to the next page else they have the ability to click and go to the main page.<br />
<br />
Hope this helps<br />
<br />
Cheers<br />
<br />
Khalid<br />
<br />
K<br />
:confused: <br />
<br />
<br />
darn ...you are quick.<!--content-->K<br />
:confused: <br />
<br />
darn ...you are quick.I was only quick to point-out the double-post kalid (cijori was the one who provided the solution over in the Javascript forum).<br />
<br />
Funny though...<br />
the Javascript solution is found here... and the non-Javascript solution is found in the Javascript forum (lol).<br />
<br />
Double-posting causes all kinds of oddities to occur.<br />
<br />
more odd than quick...<br />
k<!--content-->
 
Back
Top