RE: [PHP] Redirects in PHP
| From: | Brian S. Drexler | Date: | Fri, 13 Jun 2003 17:49:27 +0000 |
| Subject: | RE: [PHP] Redirects in PHP | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-151390@lists.php.net to get a copy of this message | ||
But is this the type of stuff that gets penalized in Search Engines or no?
-----Original Message-----
From: Ernest E Vogelsinger [mailto:ernest@vogelsinger.at]
Sent: Friday, June 13, 2003 1:47 PM
To: Zak Johnson
Cc: php-general@lists.php.net
Subject: Re: [PHP] Redirects in PHP
At 19:00 13.06.2003, Zak Johnson said:
--------------------[snip]--------------------
>This will not solve the OP's problem; the header will still be output
>first, and the client will be immediately redirected. I am curious
>though; why is everyone suggesting to use JavaScript when the following
>in the <head> section of the HTML document will work just as well?
>
> <meta http-equiv="refresh"
> content="3;URL=http://example.com/new-page.html"
> />
>
>Am I missing something?
--------------------[snip]--------------------
This will (or should...) always work regardless of JS settings. Being a
HTTP equivalent this also means you can transmit it as MIME header as well:
header('Refresh: 5;URL="http://www.microsoft.com"');
echo 'Transferring you to Microsoft in 5 seconds...';
exit;
HTH,
--
>O Ernest E. Vogelsinger
(\) ICQ #13394035
^ http://www.vogelsinger.at/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php