AWStats Changelog
-----------------
+
5.1
- New feature: ShowxxxStats parmaters accept codes to decide which columns to
show in chart.
-- New parameter: Added SkipUserAgents parameter.
+- New parameter: Added SkipUserAgents parameter to exclude some user agent
+ from statistics.
+- New parameter: Added URLWithQueryWithoutFollowingParameters to exclude some
+ parameters from URL when URLWithQuery is on.
- Fixed: Fixed pb in refreshing page when clicking on "Update Now" link (no
need to force the refresh).
- Fixed: Pb with SAMBAR server ('Expires' line appears at the top of pages).
<li><a href="#NotPageList">NotPageList</a>\r
<li><a href="#ValidHTTPCodes">ValidHTTPCodes</a>\r
<li><a href="#URLWithQuery">URLWithQuery</a>\r
+<li><a href="#URLWithQueryWithoutFollowingParameters">URLWithQueryWithoutFollowingParameters</a>\r
<li><a href="#WarningMessages">WarningMessages</a>\r
<li><a href="#NbOfLinesForCorruptedLog">NbOfLinesForCorruptedLog</a>\r
<li><a href="#SplitSearchString">SplitSearchString</a>\r
<br># same time to prevent unknown conflicts problems and avoid DoS attacks when\r
<br># AllowToUpdateStatsFromBrowser is set to 1.\r
<br># Because, when you use lock file, you can experience sometimes problems in\r
-<br># lock file not correctly removed (when process is killed for example that\r
-<br># require that you remove the file manualy), this option is not enabled by\r
+<br># lock file not correctly removed (when process is killed for example, this\r
+<br># requires that you remove the file manualy), this option is not enabled by\r
<br># default (Do not enable this option with no consol server access).\r
<br># Possible values: 0 or 1\r
<br># Default: 0\r
<br># ask AWStats to save last non corrupted file in a .bak file. This file is\r
<br># stored in "DirData" directory with other 'historic files'.\r
<br># Possible values: 0 or 1\r
-<br># Default: 1\r
+<br># Default: 0\r
<br>#\r
<br>KeepBackupOfHistoricFiles=0\r
\r
<br># different pages.\r
<br># Warning, when set to 1, memory required to run AWStats is dramatically\r
<br># increased if you have a lot of changing URLs (for example URLs with a random\r
-<br># id inside). Such web sites should not set this option to 1.\r
+<br># id inside). Such web sites should not set this option to 1 or use seriously\r
+<br># the next parameter URLWithQueryWithoutFollowingParameters.\r
<br># Possible values:\r
<br># 0 - URLs are cleaned from the query string (ie: "/mypage.html")\r
-<br># 1 - Full URL with query string is used (ie: "/mypage.html?x=y")\r
+<br># 1 - Full URL with query string is used (ie: "/mypage.html?p=x&q=y")\r
<br># Default: 0\r
<br># \r
<br>URLWithQuery=0\r
\r
<br><br><hr>\r
\r
+<a name="URLWithQueryWithoutFollowingParameters"><b>URLWithqueryWithoutFollowingParameters</b></a><br>\r
+<b>Version : </b>5.1 +<br>\r
+<br># When URLWithQuery is on, you will get the full URL with all parameters in\r
+<br># URL reports. But among thoose parameters, sometimes you don't need a\r
+<br># particular parameter because it does not identify the page or because it's\r
+<br># a random ID changing for each access even if URL points to same page. In\r
+<br># such cases, it is higly recommanded to ask AWStats to remove such parameters\r
+<br># from the URL before counting, manipulating and storing it. Enter here list\r
+<br># of all non wanted parameters. For example if you enter "id", one hit on\r
+<br># /mypage.cgi?p=abc&id=Yo4UomP9d and /mypage.cgi?p=abc&id=Mu8fdxl3r\r
+<br># will be reported as 2 hits on /mypage.cgi?p=abc\r
+<br># This parameter is not used when URLWithQuery is 0.\r
+<br># Example: "PHPSESSID"\r
+<br># Default: ""\r
+<br># \r
+<br>URLWithQueryWithoutFollowingParameters=""\r
+\r
+<br><br><hr>\r
+\r
<a name="WarningMessages"><b>WarningMessages</b></a><br>\r
<b>Version : </b>1.0 +<br>\r
<br># AWStats can detect setup problems or show you important informations to have\r
# same time to prevent unknown conflicts problems and avoid DoS attacks when
# AllowToUpdateStatsFromBrowser is set to 1.
# Because, when you use lock file, you can experience sometimes problems in
-# lock file not correctly removed (when process is killed for example that
-# require that you remove the file manualy), this option is not enabled by
+# lock file not correctly removed (when process is killed for example, this
+# requires that you remove the file manualy), this option is not enabled by
# default (Do not enable this option with no consol server access).
# Possible values: 0 or 1
# Default: 0
# ask AWStats to save last non corrupted file in a .bak file. This file is
# stored in "DirData" directory with other 'historic files'.
# Possible values: 0 or 1
-# Default: 1
+# Default: 0
#
KeepBackupOfHistoricFiles=0
# different pages.
# Warning, when set to 1, memory required to run AWStats is dramatically
# increased if you have a lot of changing URLs (for example URLs with a random
-# id inside). Such web sites should not set this option to 1.
+# id inside). Such web sites should not set this option to 1 or use seriously
+# the next parameter URLWithQueryWithoutFollowingParameters.
# Possible values:
# 0 - URLs are cleaned from the query string (ie: "/mypage.html")
# 1 - Full URL with query string is used (ie: "/mypage.html?p=x&q=y")
URLWithQuery=0
+# When URLWithQuery is on, you will get the full URL with all parameters in
+# URL reports. But among thoose parameters, sometimes you don't need a
+# particular parameter because it does not identify the page or because it's
+# a random ID changing for each access even if URL points to same page. In
+# such cases, it is higly recommanded to ask AWStats to remove such parameters
+# from the URL before counting, manipulating and storing it. Enter here list
+# of all non wanted parameters. For example if you enter "id", one hit on
+# /mypage.cgi?p=abc&id=Yo4UomP9d and /mypage.cgi?p=abc&id=Mu8fdxl3r
+# will be reported as 2 hits on /mypage.cgi?p=abc
+# This parameter is not used when URLWithQuery is 0.
+# Example: "PHPSESSID"
+# Default: ""
+#
+URLWithQueryWithoutFollowingParameters=""
+
+
# 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: 0 or 1
use vars qw/
@SessionsRange @HostAliases @AllowAccessFromWebToFollowingAuthenticatedUsers
@DefaultFile @OnlyFiles @SkipDNSLookupFor @SkipFiles @SkipHosts @SkipUserAgents
+@URLWithQueryWithoutFollowingParameters
@PluginsToLoad @DOWIndex @RobotsSearchIDOrder
@_from_p @_from_h @_time_p @_time_h @_time_k
@keylist
@HostAliases=();
@AllowAccessFromWebToFollowingAuthenticatedUsers=();
@DefaultFile = @OnlyFiles = @SkipDNSLookupFor = @SkipFiles = @SkipHosts = @SkipUserAgents = ();
+@URLWithQueryWithoutFollowingParameters = ();
@PluginsToLoad = @DOWIndex = @RobotsSearchIDOrder = ();
@_from_p = @_from_h = ();
@_time_p = @_time_h = @_time_k = ();
$FoundValidHTTPCodes=1;
next;
}
- if ($param =~ /^URLWithQuery/) { $URLWithQuery=$value; next; }
+ if ($param =~ /^URLWithQuery$/) { $URLWithQuery=$value; next; }
+ if ($param =~ /^URLWithQueryWithoutFollowingParameters$/) {
+ foreach my $elem (split(/\s+/,$value)) { push @URLWithQueryWithoutFollowingParameters,$elem; }
+ next;
+ }
if ($param =~ /^WarningMessages/) { $WarningMessages=$value; next; }
if ($param =~ /^NbOfLinesForCorruptedLog/) { $NbOfLinesForCorruptedLog=$value; next; }
if ($param =~ /^Expires/) { $Expires=$value; next; }
my $urlwithnoquery;
if ($URLWithQuery) {
$urlwithnoquery=$field[$pos_url];
- $urlwithnoquery =~ s/\?.*//;
+ my $foundparam=($urlwithnoquery =~ s/\?.*//);
# We combine the URL and query strings (for some IIS setup).
- if ($pos_query >=0 && $field[$pos_query] && $field[$pos_query] ne "-") { $field[$pos_url] .= "?" . $field[$pos_query]; }
+ if (! $foundparam && $pos_query >=0 && $field[$pos_query] && $field[$pos_query] ne "-") {
+ $foundparam=1;
+ $field[$pos_url] .= "?" . $field[$pos_query];
+ }
+ # Remove params that are marked to be ignored in URLWithQueryWithoutFollowingParameters
+ if ($foundparam && @URLWithQueryWithoutFollowingParameters) {
+ map {$field[$pos_url] =~ s/$_=[^&]*//;} @URLWithQueryWithoutFollowingParameters;
+ # Cut starting or trailing ? or &
+ $field[$pos_url] =~ tr/&/&/s;
+ $field[$pos_url] =~ s/\?&/\?/;
+ $field[$pos_url] =~ s/[\?&]$//;
+ }
}
else {
# Trunc CGI parameters in URL