You are here: Re: Redirecting URL ID's using PHP « All PHP « IT news, forums, messages
Re: Redirecting URL ID's using PHP

Posted by Sebastiaan 'CrashandDie' Lauwers on 06/16/07 11:35

Armand Brahaj wrote:

> You can do it with headers.
> if ($_GET["p"]==12)
> {
> header("Location: http://www.domain12.com/");
> exit;
> }

So basically, you have a delivery guy transporting a very heavy closet...

He has this address: www.example.com/?p=12

So he goes up the stairs, he has to do 3 floors worth of stairs (of
course the elevator is broken), with his closet, and works his ass up to
the bone in order to get there, he knocks on the door, and yells "I have
a delivery for www.exampl.." and before he even finishes the sentence,
someone answers: "No I'm sorry, you have the wrong address, it's 2
floors lower, second door on the left"...

Kind of ridicule, don't you think ?

So why, oh why, instead of playing ping pong with header requests, don't
you guys learn to properly use redirects ?

header ("Location:") is waaay overrated, just include the correct file,
and you'll be fine, and if you're not, you coded the website like an
idiot...

HTH,

S.

 

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

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