Paul Li wrote:
[...]
My question is that, the resource in the request line,
/finger-pulse-oximeter-octivetech-300c-p-37.html?osCsid=ddd, 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
manually 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
the 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
whatever 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
2355 "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
server, specify exactly which headers are being sent, and look at the
exact response 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é
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
" from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]