Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Why don't "referers" appear in the access log? 1

Status
Not open for further replies.

matias

Technical User
Jun 14, 2000
9
VE
I'm having a problem whose solution requires knowledge of the "referer". I am accessing my site from different places with different browsers and different domain names. The referer in the log file appears as "-". Why is that so and how do I fix it?
 
I'm presuming you already have the CustomLog directive turned on in httpd.conf?<br><br>Lines should look something like this:<br><br>LogFormat &quot;%h %l %u %t \&quot;%r\&quot; %&gt;s %b &quot; common<br>LogFormat &quot;%{Referer}i -&gt; %U&quot; referer<br>LogFormat &quot;%{User-agent}i&quot; agent<br>LogFormat &quot;%h %l %u %t \&quot;%r\&quot; %&gt;s %b \&quot;%{Referer}i\&quot; \&quot;%{User-Agent}i\&quot;&quot; combine<br>d <br><br>CustomLog [server path]/access_log combined&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br><br>And that after all this, it's still not showing up? And you're looking at the log itself, and not through a report?<br><br>You can try using this html code if you have SSI turned on:<br><br>&lt;!--#echo var=&quot;HTTP_REFERER&quot;--&gt; <br><br>There is also another bit of code:<br><br>referer&nbsp;&nbsp;= getenv(&quot;HTTP_REFERER&quot;);<br><br>Not sure if this is what you're looking for, though...
 
Yes. I am using &quot;combined&quot; and looking at the log itself. <br>The problem started after I did something (Don't know what).<br>Here is a log record &quot;before&quot;<br><br>200.11.216.149 - - [15/Jun/2000:09:36:10 -0400] &quot;GET /icons/back.gif HTTP/1.0&quot; 200 216 &quot;<A HREF=" TARGET="_new"> &quot;Mozilla/4.06 [en] (Win98; I)&quot;<br><br>Here is a log record &quot;after&quot;<br>200.11.216.149 - - [19/Jun/2000:14:59:34 -0400] &quot;GET / HTTP/1.0&quot; 200 725 &quot;-&quot; &quot;Mozilla/4.06 [en] (Win98; I)&quot;<br><br>Notice that the referer &quot;<A HREF=" TARGET="_new"> appears in the second record as &quot;-&quot;<br><br>I'll try your suggestions.<br>Thank you very much
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top