Return-Path: Delivered-To: apmail-httpd-users-archive@www.apache.org Received: (qmail 68437 invoked from network); 2 Aug 2008 14:36:37 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 2 Aug 2008 14:36:37 -0000 Received: (qmail 60155 invoked by uid 500); 2 Aug 2008 14:36:26 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 60136 invoked by uid 500); 2 Aug 2008 14:36:26 -0000 Mailing-List: contact users-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: users@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list users@httpd.apache.org Received: (qmail 60125 invoked by uid 99); 2 Aug 2008 14:36:26 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 02 Aug 2008 07:36:26 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of paulur@gmail.com designates 72.14.220.158 as permitted sender) Received: from [72.14.220.158] (HELO fg-out-1718.google.com) (72.14.220.158) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 02 Aug 2008 14:35:31 +0000 Received: by fg-out-1718.google.com with SMTP id 16so734287fgg.40 for ; Sat, 02 Aug 2008 07:35:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=YE6OJIAJEPLPyS4NkanJ7HP0NlWWFBsJu1dgF+67xHk=; b=XYhQe+89h23tdKX7+lC+4LrqDbUzzXZ04Xe7c9z8jqgjZZpVK1VfjPxEJVM1J4+A6b HZkHBXinzLZrJyOAainF1+I+P/cp6lCEaI+u8oBcS+DmbvhPqlmpO6nCEGikYpDkRblq iUogD+1PDlexzk+koAzrVS1/h0rkh6nyZH3YQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=ApAO601Bq0HNgRG2NgoluKtfI978Knu4XUo2hhYv+TIhZUuIQAfB4VA7vCU/qQg/Ro gF2mx5CpCaxrB8lqlX6aHQIRHkr4z10FpafA1IxHoi1xPoqFZ57ImyeLcOjKuAavjHsi UBiqyc5Ej7nSdAoXzT4+buUOvfwu5Kfe/A0gg= Received: by 10.86.26.1 with SMTP id 1mr8472581fgz.35.1217687739538; Sat, 02 Aug 2008 07:35:39 -0700 (PDT) Received: by 10.86.28.4 with HTTP; Sat, 2 Aug 2008 07:35:39 -0700 (PDT) Message-ID: <20d714960808020735p3afd331bo15416bc7a6592fc4@mail.gmail.com> Date: Sat, 2 Aug 2008 10:35:39 -0400 From: "Paul Li" To: users@httpd.apache.org In-Reply-To: <48942EB6.70600@ice-sa.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <20d714960808011705s2954b4damcf177cd7b6252720@mail.gmail.com> <48942EB6.70600@ice-sa.com> X-Virus-Checked: Checked by ClamAV on apache.org Subject: Re: [users@httpd] A question about the request line and the referer Thanks Andr=E9! Just one more question: if i want to retrieve from the access log the users' visiting history of my web site, what would you suggest? A main problem for me is that one user's request can have multiple entries in the access log. For instance, if a user send a request to the index.php page that includes two pictures named as pic1 and pic2, then there are three entries in the access log for this request. Would it in the access log look like : 127.0.0.1 - - [23/May/2008:00:05:11 -0400] "GET /index.php HTTP/1.1" 200 7349 "referer page" 127.0.0.1 - - [23/May/2008:00:05:11 -0400] "GET /pic1 HTTP/1.1" 200 10388 "/index.php" 127.0.0.1 - - [23/May/2008:00:05:12 -0400] "GET /pic2 HTTP/1.1" 200 51099 "/index.php" Consider that there are many requests. How should I separate these entries? Is the requested page, which is index.php in this example, always the first entry in the log event? Thanks again! Paul On Sat, Aug 2, 2008 at 5:53 AM, Andr=E9 Warnier wrote: > Paul Li wrote: > [...] >> >> My question is that, the resource in the request line, >> /finger-pulse-oximeter-octivetech-300c-p-37.html?osCsid=3Dddd, is >> actually a web page, but why the referer, http://www.ddd.ddd.dd/ , is >> another page? >> > Try the following experiment : > In your browser, call up the URL "www.google.com". > Then, when that page is displayed, overwrite "www.google.com" and manuall= y > call up a URL on your server. > Then check your access log. > You may find that the access to your own page is shown with the referrer > "http://www.google.com". > > The point is, the server does not really know from which page, a page on > your server is being called. It knows from which IP address it receives t= he > request, but not from which page (and it does not have to be a page). > So, in order to store the "referer" in the access log, it accepts whateve= r > the browser (or other program) which accesses the current page, is > specifying in the "Referer:" header that comes with the current request. = If > the browser (or other program) sends a request to your server, and adds a > "Referer:" header containing "Planet Mars", then that is what your server > will put in the access log. > > Example : > 192.168.250.152 - - [02/Aug/2008:11:44:21 +0200] "GET / HTTP/1.1" 200 235= 5 > "Planet Mars" "lwp-request/2.08" > > The above line of access.log was obtained as follows : > Along with perl, comes a very handy command-line program named > "lwp-request", which allows one to compose a HTTP request to a HTTP serve= r, > specify exactly which headers are being sent, and look at the exact respo= nse > sent by the server (headers and all). > The command I used was : > > lwp-request -Sed -m GET -H "Referer: Planet Mars" "http://localhost" > > (the "-H" option allows to manually add a HTTP header to the request) > > Andr=E9 > > > --------------------------------------------------------------------- > The official User-To-User support forum of the Apache HTTP Server Project= . > See for more info. > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org > " from the digest: users-digest-unsubscribe@httpd.apache.org > For additional commands, e-mail: users-help@httpd.apache.org > > --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See for more info. To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org " from the digest: users-digest-unsubscribe@httpd.apache.org For additional commands, e-mail: users-help@httpd.apache.org