Example from log:
www.mydomain.c0m/destinationpage.shtml -> mydomain.c0m/destinationpage.shtml
My understanding is that this was written for Unix and my server is NT. I am VERY new to Pearl and have no idea what I need to change to get this to work correctly.
Can anyone spot the problem or advise based of the snip of code I have posted below? Let me know if you need more info...
Thanks for looking!
---
if ($RefererFile &&!($NoCountHit)) {
open (COUNT,">>$RefererFile");
if (defined $ENV{'HTTP_REFERER'}) {
$doc_referer = $ENV{'HTTP_REFERER'};
}
else { $doc_referer = ""; }
if ($doc_referer && $doc_uri) {
unless ($IgnoreIntRefs && ($doc_referer =~ m#$server#oi)) {
print COUNT "$doc_referer -> $doc_uri\n";
}
}
close (COUNT);
}
---
If the code snippet in your post is the part that prints the example line from your logs the first part should indeed be the referrer ,as it says that $doc_referer = $ENV{'HTTP_REFERER'};
It is printed in this line:
print COUNT "$doc_referer -> $doc_uri\n";
The snippet does not show what $doc_uri is, so it's impossible to tell if that could be the cause of the problem.
Note that if you did not configure $IgnoreIntRefs (and $server) somewhere, a browser-reload might cause your logs to look like your example. (A page on your domain is both the referrer and the destination). It looks like mydomain.com ($server) can be excluded as referrer by setting $IgnoreIntRefs.