RE: [PHP] PHP REDIRECT
| From: | Chris Shiflett | Date: | Mon, 16 Feb 2004 16:50:41 +0000 |
| Subject: | RE: [PHP] PHP REDIRECT | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-177827@lists.php.net to get a copy of this message | ||
--- Chris <chris@leftbrained.org> wrote:
> You can't view the page and have PHP redirect it. You would need to
> use a <meta> refresh tag or JavaScript.
I assume by meta refresh tag, you mean this:
<meta http-equiv="refresh" content="10;URL=http://example.org/">
What most people seem to not realize, is that the http-equiv attribute is
just a way to specify HTTP headers in a meta tag. This is handy when you
want to do so in static pages, but PHP has a more proper way to specify
headers:
http://www.php.net/header
This creates a real HTTP header, and there is no reason for any PHP
developer to use a meta tag for this purpose.
Hope that helps.
Chris
=====
Chris Shiflett - http://shiflett.org/
PHP Security - O'Reilly
Coming mid-2004
HTTP Developer's Handbook - Sams
http://httphandbook.org/
PHP Community Site
http://phpcommunity.org/