]> git.ipfire.org Git - thirdparty/AWStats.git/commitdiff
Added URLReferrerWithQuery parameter.
authoreldy <>
Mon, 21 Oct 2002 12:37:37 +0000 (12:37 +0000)
committereldy <>
Mon, 21 Oct 2002 12:37:37 +0000 (12:37 +0000)
docs/awstats_changelog.txt
docs/awstats_config.html
wwwroot/cgi-bin/awstats.model.conf
wwwroot/cgi-bin/awstats.pl

index 3e37f6e2b76ac4f96e324e1e8fcb53f3723d4f69..5404eb645a8a7c5515de3f0b03ff86c01c2b8064 100644 (file)
@@ -17,8 +17,10 @@ AWStats Changelog
 - New parameter: Added URLNotCaseSensitive.
 - New parameter: Added URLWithQueryWithoutFollowingParameters to exclude some
   parameters from URL when URLWithQuery is on.
+- New parameter: Added URLReferrerWithquery.
 - Added tag %Dw-n for LogFile parameter (replaced with the day number in week
   but differs from %DW-n because start with 0).
+- Fixed: Log analyze is no more stopped if log file contains binary chars.
 - Fixed: -debug option is allowed in migrate.
 - Fixed: Wrong window was opened when clicking on flag link when
   UseFramesWhenCGI was on.
index 945e3a1aaa4d302d12d3901f15ef3db4a264943b..6d9e2af35d9c5ad6b1eea9d6d2d73a34f8faf249 100644 (file)
@@ -83,6 +83,7 @@ when reading it), follow the example:<br>
 <li><a href="#URLNotCaseSensitive">URLNotCaseSensitive</a>\r
 <li><a href="#URLWithQuery">URLWithQuery</a>\r
 <li><a href="#URLWithQueryWithoutFollowingParameters">URLWithQueryWithoutFollowingParameters</a>\r
+<li><a href="#URLReferrerWithQuery">URLReferrerWithQuery</a>\r
 <li><a href="#WarningMessages">WarningMessages</a>\r
 <li><a href="#NbOfLinesForCorruptedLog">NbOfLinesForCorruptedLog</a>\r
 <li><a href="#SplitSearchString">SplitSearchString</a>\r
@@ -762,7 +763,7 @@ when reading it), follow the example:<br>
 \r
 <a name="URLWithQuery"><b>URLWithQuery</b></a><br>\r
 <b>Version : </b>3.2 +<br>\r
-<br># Keep or attach the query string to the URL in the statistics for individual\r
+<br># Keep or remove the query string to the URL in the statistics for individual\r
 <br># pages. This is primarily used to differentiate between the URLs of dynamic\r
 <br># pages. If set to 1, mypage.html?id=x and mypage.html?id=y are counted as two\r
 <br># different pages.\r
@@ -798,6 +799,21 @@ when reading it), follow the example:<br>
 \r
 <br><br><hr>\r
 \r
+<a name="URLReferrerWithQuery"><b>URLReferrerWithQuery</b></a><br>\r
+<b>Version : </b>5.1 +<br>\r
+<br># Keep or remove the query string to the referrer URL in the statistics for\r
+<br># external referrer pages. This is used to differentiate between the URLs of\r
+<br># dynamic referrer pages. If set to 1, mypage.html?id=x and mypage.html?id=y\r
+<br># are counted as two different referrer pages.\r
+<br># Possible values:\r
+<br># 0 - Referrer URLs are cleaned from the query string (ie: "/mypage.html")\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>URLReferrerWithQuery=0\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
index f1d3c271386075def37550fdf1235c8f6151c11c..b1b17a7c6b0dfd84459c2f514601e4e8dc0f76bb 100644 (file)
@@ -443,7 +443,7 @@ ValidHTTPCodes="200 304"
 URLNotCaseSensitive=0
 
 
-# Keep or attach the query string to the URL in the statistics for individual
+# Keep or remove the query string to the URL in the statistics for individual
 # pages. This is primarily used to differentiate between the URLs of dynamic
 # pages. If set to 1, mypage.html?id=x and mypage.html?id=y are counted as two
 # different pages.
@@ -475,6 +475,18 @@ URLWithQuery=0
 URLWithQueryWithoutFollowingParameters=""
 
 
+# Keep or remove the query string to the referrer URL in the statistics for
+# external referrer pages. This is used to differentiate between the URLs of
+# dynamic referrer pages. If set to 1, mypage.html?id=x and mypage.html?id=y
+# are counted as two different referrer pages.
+# Possible values:
+# 0 - Referrer 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")
+# Default: 0
+# 
+URLReferrerWithQuery=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: 0 or 1
index c759f191c09333e9d0f992683de798ad88fe5df6..7db4c147acc38f3043b3f7d02219a49bfa19c139 100644 (file)
@@ -110,7 +110,8 @@ $NbOfLinesShowsteps $NewLinePhase $NbOfLinesForCorruptedLog $PurgeLogFile
 $ShowAuthenticatedUsers $ShowFileSizesStats
 $ShowDropped $ShowCorrupted $ShowUnknownOrigin $ShowLinksToWhoIs
 $ShowEMailSenders $ShowEMailReceivers
-$Expires $UpdateStats $MigrateStats $URLNotCaseSensitive $URLWithQuery $UseFramesWhenCGI $DecodeUA
+$Expires $UpdateStats $MigrateStats $URLNotCaseSensitive $URLWithQuery $URLReferrerWithQuery
+$UseFramesWhenCGI $DecodeUA
 /;
 ($EnableLockForUpdate, $DNSLookup, $AllowAccessFromWebToAuthenticatedUsersOnly,
 $BarHeight, $BarWidth, $CreateDirDataIfNotExists, $KeepBackupOfHistoricFiles, $MaxLengthOfURL,
@@ -123,8 +124,9 @@ $NbOfLinesShowsteps, $NewLinePhase, $NbOfLinesForCorruptedLog, $PurgeLogFile,
 $ShowAuthenticatedUsers, $ShowFileSizesStats,
 $ShowDropped, $ShowCorrupted, $ShowUnknownOrigin, $ShowLinksToWhoIs,
 $ShowEMailSenders, $ShowEMailReceivers,
-$Expires, $UpdateStats, $MigrateStats, $URLNotCaseSensitive, $URLWithQuery, $UseFramesWhenCGI, $DecodeUA)=
-(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
+$Expires, $UpdateStats, $MigrateStats, $URLNotCaseSensitive, $URLWithQuery, $URLReferrerWithQuery,
+$UseFramesWhenCGI, $DecodeUA)=
+(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
 use vars qw/
 $AllowToUpdateStatsFromBrowser $ArchiveLogRecords $DetailedReportsOnNewWindows
 $FirstDayOfWeek $KeyWordsNotSensitive $SaveDatabaseFilesWithPermissionsForEveryone
@@ -1111,16 +1113,17 @@ sub Parse_Config {
                        next;
                        }
                if ($param =~ /^URLNotCaseSensitive$/)          { $URLNotCaseSensitive=$value; 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; }
-               if ($param =~ /^WrapperScript/)         { $WrapperScript=$value; next; }
-               if ($param =~ /^DecodeUA/)                      { $DecodeUA=$value; next; }
+               if ($param =~ /^URLReferrerWithQuery$/)         { $URLReferrerWithQuery=$value; next; }
+               if ($param =~ /^WarningMessages/)               { $WarningMessages=$value; next; }
+               if ($param =~ /^NbOfLinesForCorruptedLog/)      { $NbOfLinesForCorruptedLog=$value; next; }
+               if ($param =~ /^Expires/)                       { $Expires=$value; next; }
+               if ($param =~ /^WrapperScript/)                 { $WrapperScript=$value; next; }
+               if ($param =~ /^DecodeUA/)                              { $DecodeUA=$value; next; }
                # Read optional accuracy setup section
                if ($param =~ /^LevelForRobotsDetection/)                       { $LevelForRobotsDetection=$value; next; }
                if ($param =~ /^LevelForBrowsersDetection/)                     { $LevelForBrowsersDetection=$value; next; }
@@ -1480,6 +1483,7 @@ sub Check_Config {
        if (! $DefaultFile[0])                          { $DefaultFile[0]="index.html"; }
        if ($URLNotCaseSensitive !~ /[0-1]/)            { $URLNotCaseSensitive=0; }
        if ($URLWithQuery !~ /[0-1]/)                   { $URLWithQuery=0; }
+       if ($URLReferrerWithQuery !~ /[0-1]/)           { $URLReferrerWithQuery=0; }
        if ($WarningMessages !~ /[0-1]/)                { $WarningMessages=1; }
        if ($NbOfLinesForCorruptedLog !~ /^\d+/ || $NbOfLinesForCorruptedLog<1) { $NbOfLinesForCorruptedLog=50; }
        if ($Expires !~ /^\d+/)                                 { $Expires=0; }
@@ -5330,7 +5334,7 @@ if ($UpdateStats && $FrameName ne "index" && $FrameName ne "mainleft") {  # Updat
                                                        $found=1;
                                                }
                                                else {
-                                                       # This hit came from the search engine
+                                                       # This hit came from a search engine
                                                        if ($PageBool) { $_from_p[2]++; }
                                                        $_from_h[2]++;
                                                        $_se_referrals_h{$TmpRefererServer{$refererserver}}++;
@@ -5376,8 +5380,14 @@ if ($UpdateStats && $FrameName ne "index" && $FrameName ne "mainleft") { # Updat
                                                if ($PageBool) { $_from_p[3]++; }
                                                $_from_h[3]++;
                                                # http://www.mysite.com/ must be same referer than http://www.mysite.com but .../mypage/ differs of .../mypage
-                                               #if ($refurl[0] =~ /^[^\/]+\/$/) { $field[$pos_referer] =~ s/\/$//; }   # Code moved in save
-                                               $_pagesrefs_h{$field[$pos_referer]}++;
+                                               #if ($refurl[0] =~ /^[^\/]+\/$/) { $field[$pos_referer] =~ s/\/$//; }   # Code moved in SaveHistory
+                                               if ($URLReferrerWithQuery) {
+                                                       $_pagesrefs_h{$field[$pos_referer]}++;
+                                               }
+                                               else {
+                                                       if ($field[$pos_referer]=~/^(.*)\?/) { $_pagesrefs_h{"$1"}++; }
+                                                       else { $_pagesrefs_h{$field[$pos_referer]}++; }
+                                               }
                                                $found=1;
                                        }
                                }