Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I tried to change log format and change HTTP_REFERER using perl to change browser's referrer like below.

Log Format : %{HTTP_REFERER}o
perl       : $ENV{'HTTP_REFERER'} = "http://www.google.com";

Log Format : %{X-RT-REF}o
perl       : addHeader('X-RT-REF' => "http://www.google.com");

Log Format : %{HTTP_REFERER}e
perl       : $ENV{'HTTP_REFERER'} = "http://www.google.com";

but they didn't work. How can I do it? If you have any idea please teach me. Note that I just want to do this as a countermeasure for illegal access in my intra tool.

share|improve this question
We'll need some more information about this. For starters, where are you trying to change the referrer? In the browser? In the application? In the log files? Also, what server software are you using and where do the above snippets fit in? –  Ladadadada Nov 15 '12 at 9:51
Thank you for your quick response. The first question's answer is "In the application". The second question's answer is "Apache2". –  zuqqhi2 Nov 15 '12 at 9:57
The perl scripts are on apache server as a part of CGI. The log formats are written at httpd.conf file. –  zuqqhi2 Nov 15 '12 at 10:08

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.