On Wed, 23 Mar 2005, Sangeeta Chachlani wrote:
I just want to get hold of the the main website url that the user types on his browser and not the other components. Is there way to get access to only the main url?
There is not really a such thing in HTTP as "the main website URL". There is just requests for objects where some objects are HTML, some objects are images, some objects are flash animations etc, and the browser puts them all together into a displayed page.
But you may be able to accomplish what you look for by using the custom log formats patch <url:http://devel.squid-cache.org>, combined with an req_header acl to not log requests with a Referer header.
acl has_referer req_header Referer .*
access_log /path/to/access.log !has_referer
Regards Henrik