问题
I'm using something like this
mysite.com/out.php?url=outurl.com
I'm just using a simple redirect, but I'm just wondering how I can hide the referrer.
Thanks!
edit: I ended up doing a double meta refresh
回答1:
The referrer is attached by the user's browser, not by your server, it's up to them to include it or not
回答2:
If by hide you mean to remove it from the address bar than you could use a POST request instead of GET or a custom HTTP header. As a third option you could use a GET request but encrypt the data. Also I suppose you are talking about some custom referrer and not the standard HTTP referrer which might be sent by the user agent.
回答3:
If you're really serious about hiding the referrer from downsteam sites, you have options...
For example you could try the service
http://referer.us/
which offers rediction (i.e. all referrals appear to come from instead of you).
Depending on your goals, you could easily implement a similar service yourself, either at your own domain (e.g. "/generic-referer.html" if you don't want people seeing the deep-linked page from which a visitor is coming) or a new domain that you control.
来源:https://stackoverflow.com/questions/2705820/hide-referer-php-or-html-or-js-doesnt-matter