You are here: Re: locally works/remotely breaks? (Oracle related?) « PHP Programming Language « IT news, forums, messages
Re: locally works/remotely breaks? (Oracle related?)

Posted by Daniel Tryba on 07/01/05 16:32

melih.onvural@gmail.com wrote:
[extrenal request redirects to:]
> header("Location: http://localhost/nextpage.php");
>
> the proper form of redirection?

Well, Duh! localhost is the machine where the browser is running on.
Your friend connects to http://example.com/page.php and gets a redirect
to _his_ machine at http://localhost/nextpage.php.

The Q&D hack is to redirect to 'Location: nextpage.php', it violates the
HTTP rfc but in practice I have yet to see a browser that doesn't
redirect to the correct URL with this.

Better would be to redirect to "Location: http://{$_SERVER['HTTP_HOST']}/nextpage.php"

 

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

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