"Brian" <[EMAIL PROTECTED]> writes:

> I have a unique situation in which I need to change the http_referer.
> What I've done is written a quick script that looks like this:
[snip]
> 
> Now, the problem is this:  It works perfectly as long as the client
> remains on our server.  But, if they go to another domain the referer
> reverts back to what it was before.  I need to change it, and have it
> stay changed.  Is there ANY way of doing this with mod_perl?  Any help
> is appreciated.  I've been beating my head on the desk for a while here.
> :o)
> 

There is no way to do this.  The REFERER field is set by the web client and
can not be altered by the server.  Once it's sent to the server as part of
a HTTP request, the server is free to modify it as it sees fit (as you've
done in mod_perl), but it can not tell the client to adopt this new value.

Two possible workarounds would be to direct hyperlinks to an intermediate
page which in turn redirects the client the final destination.  That should
set the REFERER correctly to the intermediate page (though perhaps not for
302 redirects).  Another possibility would be to abandon using the REFERER
field altogether.  Use a cookie to encode the necessary information or
encode it in the query string of the request itself.

Reply via email to