Thanks Neil, had not thought of doing it that way seems much more
elegant than what I was doing anyway.
Will work that into the code and finaly have it behaving right... now if I
could just get the http referer parsed right for the log file
Jon
"Neil Smith" <[EMAIL PROTECTED]> wrote in messag
$_SERVER["SERVER_NAME"]
then just do a switch on the $_SERVER["SERVER_NAME"] and then
header("Location:") to redirect them.
there may be a tidier way, but that's what i do...
-skate-
- Original Message -
From: "Shaffin Bhanji" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday,
Hello,
I need a PHP redirector for my server in which I host multiple web
sites as follows:
Site 1
Local Path: /var/www/htdocs/site1
Server IP: 192.168.1.10
URL: www.site1.com
Site 2
Local Path: /var/www/htdocs/site2
Server IP: 192.168.1.10
URL: www.site.com
When someone refers t
Jon,
Try this:
if (($_SERVER[HTTP_REFERER] == "") || ($_SERVER[HTTP_REFERER] !=
"http://your_domain/your_file_name";)){
echo "You came from different page or tried to open this file
directly!";
}else {
echo "You came from my page";
}
Take care,
Igor P.
-Original Message-
From: Jon Phipp
You need to split this into 2 separate pages. In page 2 you run the create
page2 function as normal, the same for page 1 with just the create page1
function.
The only difference is that in the HEAD of page1, add the following HTML
tag (since this is an HTML question not a PHP question) :
No
I am having no end of bad luck getting the refering page returned, the issue
may be that I am doing redirects using javascript if a document is not
loaded correctly.
//
// test and redirect if needed
//