You are here: Re: redirecting to another website « HTML « IT news, forums, messages
Re: redirecting to another website

Posted by J.O. Aho on 02/24/07 20:50

pkg wrote:
>> 1. redirect in the web server config (apache):
>> Redirect permanent /abc/123.htmlhttp://www.mywebsite.de/xyz/987.html
>
> Well, I don't want to bother the our webmasters with these things! And
> I think they are the only persons who could change the web server
> config ...
>
>> 2. Use server side script (php):
>> <?php header("Location:http://www.mywebsite.de/xyz/987.html"); ?>
>
> as before

If php is enabled, then there is nothing to ask the admins, it's just create a
php script and put it on the server in the same way as a html page. The
example is everything you need.


>> 3. Use meta tag to redirect:
>> <META http-equiv="refresh"
>> content="0;URL=http://www.mywebsite.de/xyz/987.html">
>
> This sounds as if I could do it without the web admins. Could you give
> some more details what you mean? (you know, I have actually no
> knowledge!)

--- the html page ---
<html>
<head>
<title>redirect</title>
<META http-equiv="refresh"
content="0;URL=http://www.mywebsite.de/xyz/987.html">
</head>
<body>
</body>
</html>
--- eof ---


>> 4. Use some javascript to redirect:
>> <body onload="document.location='http://www.mywebsite.de/xyz/987.html'">
>
> Sounds good as well. Please give more details ( I don't "speak" java!)

JavaScript isn't Java, just similar names and as I pointed out before, it's
not a good idea, as you will be even less sure about the redirect will happen
than with the meta tag, the php script will ensure you a better reliability
that the redirect has been done.


--

//Aho

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация