Hit redirection & HTTP_REFERER

  • Thread starter Thread starter Troy
  • Start date Start date
T

Troy

Hi all,

I have a hit counter that is utilized through a page on our webserver
to track statistics on our clients internally. However, on the
hitcounter page i do a server side re-direct on our server to the new
URL. This does not however pass the HTTP_REFERER variable to our
clients homepage as the user didn't actually click an anchor tag with an
HREF to the specific URL. We *need* to do this - so what we want to do
is still use the internal stats we keep, but some how pass the
HTTP_REFERER info via javascript or something to our clients site? From
my research so far - this does not seem possible. I've even tested with
a META refresh, javascritp document.location.href redirect and so on.
All of them will not pass the HTTP_REFERER unless the user actually
clicks the <a> tag with the exact URL in it. Any insight on this would
be greatly appreciated. Thanks!
 
Troy said:
Hi all,

I have a hit counter that is utilized through a page on our
webserver to track statistics on our clients internally. However, on
the hitcounter page i do a server side re-direct on our server to the
new URL.

There is no such thing as server-side redirect. Redirects are "special" HTTP
responses sent to the client. Anything else is a flow control feature of
your web application's platform. So I guess you're doing a
Server.Transfer()?
This does not however pass the HTTP_REFERER variable to our
clients homepage as the user didn't actually click an anchor tag with
an HREF to the specific URL. We *need* to do this [...]

Then you better start rethinking your approach. Proxies may change this
header as they see fit. Unless you're talking about an intranet solution,
this is completely beyond your control.

Cheers,
 
Back
Top