I would suspect that you had a default template if there is no referer

<?php

$template = "default_template.php"; //or whatever you use to call it

if (!empty($_SERVER['HTTP_REFERER'] )) $template = $_SERVER['HTTP_REFERER'] ;

....

?>

bastien

From: "Chris Payne" <[EMAIL PROTECTED]>
To: <php-db@lists.php.net>
Subject: [PHP-DB] http_referer question for DB access
Date: Wed, 11 Jan 2006 16:18:03 -0500

Hi there everyone,



I have a system which dynamically creates a template based website which can
be turned on or off by a switch, to access it a user would do
http://www.websitename/templatename and then it would produce a 404 (NOT
look for a dir as this allows me to use a DB switch to enable the system).
However, when they enter a similar URL as the above it DOES redirect using:



ErrorDocument 404 /redirect.php



BUT the PHP page it redirects to, which has the following code:



<?php



echo $_SERVER['HTTP_REFERER']



?>



DOESN'T show the referrer page and I MUST have that in order to find what
template they are aimining to look at.  I can't query my MySQL DB without
this information, am I doing something wrong?  I did it once before about a
year ago but no longer have the code and I SWEAR I did it this way.



Any help would really be appreciated.



Chris


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

Reply via email to