Posted by J.O. Aho on 02/24/07 20:28
pkg wrote:
> Dear all!
>
> how can I obtain that if somebody calls the website with address
> www.mywebsite.de/abc/123.html
> he/she is redirected to the website with address with address
> www.mywebsite.de/xyz/987.html
> ??? With "redirected" I mean that automatically the second page is
> opened if the first is called.
There is different ways to do it
1. redirect in the web server config (apache):
Redirect permanent /abc/123.html http://www.mywebsite.de/xyz/987.html
2. Use server side script (php):
<?php header("Location: http://www.mywebsite.de/xyz/987.html"); ?>
3. Use meta tag to redirect:
<META http-equiv="refresh"
content="0;URL=http://www.mywebsite.de/xyz/987.html">
4. Use some javascript to redirect:
<body onload="document.location='http://www.mywebsite.de/xyz/987.html'">
I have listed those in the order in which I would use those, server settings
is best, server side script is second, third is meta tag and last javascript
as people don't always enable it.
> I should tell you that I am completely new to html ... so I would
> appreciate answers adapted to my low level of proficiency in this
> stuff!!!
I hope the examples are easy enough to use.
--
//Aho
Navigation:
[Reply to this message]
|