PHP List

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



	I'm wanting to redirect users using a PHP script.

	If I use only a .htaccess redirect, it takes approx 1 sec to go to the new URL.  However, if I redirect to the following PHP script first, it takes approx 3 seconds to bring up the new URL.  The included page_hit_counter.php script gets called for both, so that's not the bottleneck.

	Can someone see what the problem might be?

Thank you,
Jenni



<?php

$qs = $_SERVER[QUERY_STRING];
$_REQUEST['seo_redirect'] = $qs;

include_once('page_hit_counter.php');

$parts = explode('/', $qs);

$redirect_url = 'https://www.domain.com/'.$parts[1].'/product/'.$parts[2];

header( 'Content-type: text/html; charset=utf-8' );
header( 'Location: '.$redirect_url );

flush();
ob_flush();
exit; 

?>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux