Forum Moderators: coopster
SITE1 --goes_to--> SITE2 --goes_to--> MYSITE
I get on MYSITE:
.htaccess ref => SITE1 (!)
php ref => SITE2
My .htaccess rule is like this:
RewriteCond %{HTTP_REFERER} (SITE1\.com) [NC,OR]
RewriteRule ^index.shtml$ index-bad.php?re=%1
And in index-bad.php i log refs to file $_SERVER['HTTP_REFERER']
Why they are different?..
welcome to webmasterworld. good question, it should be the same because $_SERVER is filled with values directly by your apache and this is the same apache using its server variable %{HTTP_REFERER}.
some details i would play around with: remove the ,OR from [NC,OR] in the cond line and place a [L] at the end of the rule line. maybe the [L] helps here, but this is only a quick shot.
if it's not this, check your CGI setup because the referer is passed via the CGI Interface to PHP. if it's the php-module version then check your apache server config (httpd.conf) for this, too.
I was ammused to see different refs, cause i thought they should be the same.
Thanks!..
p.s. I'm going to test this on another server.