Click to See Complete Forum and Search --> : URL Redirection
maxtech
03-16-2003, 12:53 PM
Hi,
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.
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,
Pls help & guide.
khaki
03-16-2003, 01:07 PM
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:
http://forums.webdeveloper.com/showthread.php?s=&threadid=6038
Please don't double-post. It breaks-up the answers.
k
khalidali63
03-16-2003, 01:08 PM
typically this is done in this way,
a link that points to your index page and some javascript code for automatic redirection.
put this code in between the head tags of the page from where you want to be redirected.
<script type="text/javascript">
window.location.href = "http://www.abcd.com/index.html"
</script>
and in the body section put this line
<a href = "http://www.abcd.com/index.html">abcd home</a>
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.
Hope this helps
Cheers
Khalid
K
:confused:
darn ...you are quick.
khaki
03-16-2003, 02:02 PM
K
:confused:
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).
Funny though...
the Javascript solution is found here... and the non-Javascript solution is found in the Javascript forum (lol).
Double-posting causes all kinds of oddities to occur.
more odd than quick...
k