Skip to main content

HTTP_REFERER

A friend of mine ask me if a server can know where we come from before we go to that server (referal link).
YES. This information is the field "HTTP_REFERRER" in $_SERVER of the coming request.
Here is an example:
http://113.161.96.198/referal/

For the reason of SEO, some guys do not want any server know about this referal link that points to their own server.
Here are some solutions:
HTML5:
Add norefer attribute
 No REFERRER

PHP redirect:
<?php
header( 'Location: http://113.161.96.198/referal/' ) ;
?>
.... lot of solutions lol

Comments