Re: Location header - slow redirect
| From: | Nicholas Robinson | Date: | Wed, 30 Jul 2003 11:56:58 +0000 |
| Subject: | Re: Location header - slow redirect | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-157510@lists.php.net to get a copy of this message | ||
try putting this after the header:
echo "<HTML></HTML>";
It forces the redirect to take place immediately (in most cases!).
HTH
On Wednesday 30 Jul 2003 11:53 am, admin wrote:
> I'm using the following short script to redirect users to another page
> on my site (php 4.3.2, Apache 2.0.47).
>
> <?php
> $goLang='en';
> header("Location: http://" .
> $_SERVER['HTTP_HOST'] . "/" . $goLang . "/");
> exit;
> ?>
>
> I'm having a problem where it takes up to 15 seconds for the redirect
> page to load, but for other redirects on the site programmed in a
> similar way using php and the location header the page loads straight away.
>
> I'm a bit perplexed and would appreciate some suggestions.
> Thanks
> Phil