# %methodurlnoprot Method and URL with format "GET /index.html"
# %method Method with format GET
# %url URL only with format /index.html
+# %query Query string (used by URLWithQuery option)
# %code HTTP return code with format xxx
# %bytesd Size of document in bytes
# %refererquot Referer page with format "http://from.com/from.htm"
#
OnlyFiles=""
+# Keep or attach the query string to the URL in the statistics for individual
+# pages. This is primarily used to differentiate between the URLs of dynamic
+# pages.
+# Possible values:
+# 0 - URLs are cleaned from the query string (ie: "/mypage.html")
+# 1 - Full URL with query string is used (ie: "/mypage.html?x=y")
+# Default: 0
+#
+URLWithQuery=0
+
+# Search engines keywords reported are full search string or separate keywords
+# Possible values:
+# 0 - Search keywords reported are full search string (ie: "town maps")
+# 1 - Search keywords reported are separated words (ie: "town" and "maps")
+# Default: 0
+#
+SplitSearchString=0
+
# AWStats can detect setup problems or show you important informations to have
# a better use. Keep this to 1, except if AWStats says you can change it.
# Possible values: 1 or 0
#
ShowLinksOnUrl=1
-# Search engines keywords reported are full search string or separate keywords
-# Possible values:
-# 0 - Search keywords reported are full search string (ie: "town maps")
-# 1 - Search keywords reported are separated words (ie: "town" and "maps")
-# Default: 0
-#
-SplitSearchString=0
-
# You can put here HTML code that will be added at the end of AWStats reports.
# Great to add advert ban.
# Default: ""
$SiteConfig, $SiteDomain, $SiteToAnalyze, $SiteToAnalyzeWithoutwww,
$TotalBytes, $TotalDifferentPages, $TotalErrors, $TotalHits,
$TotalHostsKnown, $TotalHostsUnKnown, $TotalPages, $TotalUnique, $TotalVisits,
-$URLFilter, $UserAgent, $WarningMessages, $YearRequired,
+$URLFilter, $URLWithQuery, $UserAgent, $WarningMessages, $YearRequired,
$color_Background, $color_TableBG, $color_TableBGRowTitle,
$color_TableBGTitle, $color_TableBorder, $color_TableRowTitle, $color_TableTitle,
$color_h, $color_k, $color_link, $color_p, $color_s, $color_v, $color_w, $color_weekend,
%MonthBytes = %MonthHits = %MonthHostsKnown = %MonthHostsUnknown = %MonthPages = %MonthUnique = %MonthVisits =
%monthlib = %monthnum = ();
-$VERSION="3.1 (build 41)";
+$VERSION="3.2 (build 1)";
$Lang="en";
# Default value
next;
}
if ($param =~ /^LogFormat/) { $LogFormat=$value; next; }
+ if ($param =~ /^URLWithQuery/) { $URLWithQuery=$value; next; }
if ($param =~ /^AllowToUpdateStatsFromBrowser/) { $AllowToUpdateStatsFromBrowser=$value; next; }
if ($param =~ /^HostAliases/) {
my @felter=split(/\s+/,$value);
if ($LogFormat =~ /^[\d]$/ && $LogFormat !~ /[1-4]/) { error("Error: LogFormat parameter is wrong. Value is '$LogFormat' (should be 1 or 2 or a 'personalised AWtats log format string')"); }
if ($DNSLookup !~ /[0-1]/) { error("Error: DNSLookup parameter is wrong. Value is '$DNSLookup' (should be 0 or 1)"); }
# Optional section
+ if ($URLWithQuery !~ /[0-1]/) { $URLWithQuery=0; }
if ($AllowToUpdateStatsFromBrowser !~ /[0-1]/) { $AllowToUpdateStatsFromBrowser=1; } # For compatibility, is 1 if not defined
if ($PurgeLogFile !~ /[0-1]/) { $PurgeLogFile=0; }
if ($ArchiveLogRecords !~ /[0-1]/) { $ArchiveLogRecords=1; }
$i++;
$PerlParsingFormat .= "([^\\s]*) ";
}
+ if ($f =~ /%query$/ || $f =~ /cs-uri-query$/) {
+ $found=1;
+ $pos_query = $i;
+ $i++;
+ $PerlParsingFormat .= "([^\\s]*) ";
+ }
if ($f =~ /%code$/ || $f =~ /%.*>s$/ || $f =~ /sc-status$/) {
$found=1;
$pos_code = $i;
}
# Canonize and clean target URL and referrer URL
+ if ($URLWithQuery) {
+ # We combine the URL and query strings.
+ if ($field[$pos_query] && ($field[$pos_query] ne "-")) { $field[$pos_url] .= "?" . $field[$pos_query]; }
+ }
+ else {
+ # Trunc CGI parameters in URL
+ $field[$pos_url] =~ s/\?.*//;
+ }
$field[$pos_url] =~ s/\/$DefaultFile$/\//; # Replace default page name with / only
- $field[$pos_url] =~ s/\?.*//; # Trunc CGI parameters in URL get
$field[$pos_url] =~ s/\/\//\//g; # Because some targeted url were taped with 2 / (Ex: //rep//file.htm)
# Check if page or not