<!--#exec cgi="/cgi-bin/prog.pl" -->
and shows the HTTP_REFERER as whatever link the user clicked on , i.e they went from page1.shtml to page2.shtml the tracker shows a hit for page1 then a hit for page2 with the referrer being page1.
My problem is on the new host the same script shows a hit for page1, then the hit for page2 - but the referrer shows as page2.shtml itself! Its almost as if the perl script is saying its own referrer is page2.shtml because that is where it was called from...
Can anyone help?
<!--#include virtual="/cgi-bin/counter.cgi"-->
or
<!--#include virtual="foo.htm"-->
Anyway, what I would do, is dump the server environ variables to a file and see what it is kicking out. Could be the new host has a different setup. At the top of your script add:
open FILE ">>env-log.txt";
foreach $key (sort keys %ENV) {
print FILE "key: $key value: $ENV{$key}\n";
}
print FILE "--------\n";
close (FILE);
Then call a page with your ssi on it once to generate the log file a few times and look at what is being passed to scripts. Some boxes have server script wrappers that manipulate the variables before passing them to a script process. I've been on hosts where all the environment variables started with "WRAPPER_" etc.
An HTTP_Referer comes from the browser, so that should be independent of anything your script is doing. If the browser sent a referrer, it should be in the variables.