]> git.ipfire.org Git - thirdparty/AWStats.git/commitdiff
- Better 404 errors management. URLs are always cleaned from their
authoreldy <>
Sun, 23 Feb 2003 05:53:14 +0000 (05:53 +0000)
committereldy <>
Sun, 23 Feb 2003 05:53:14 +0000 (05:53 +0000)
  parameter to build list 404 not found URLs list (because parameters are not
  intersting as they can't have effect because page is not found). Referrer
  URLs list for 40 not fouond URLs are kept with parameters only if
  URLReferrerWithQuery is set to 1. This make this report more useful.

docs/awstats_changelog.txt
wwwroot/cgi-bin/awstats.pl

index 9f143c1ed7f4a1a469e417b0014c84c88995051e..6a31c6acb4297f94c2b71280408db9f14454067a 100644 (file)
@@ -11,6 +11,11 @@ Fixes:
 
 New features/improvments:
 - Added a screen size report.
+- Better 404 errors management. URLs are always cleaned from their
+  parameter to build list 404 not found URLs list (because parameters are not
+  intersting as they can't have effect because page is not found). Referrer
+  URLs list for 40 not fouond URLs are kept with parameters only if
+  URLReferrerWithQuery is set to 1. This make this report more useful.
 
 Other/Documentation:
 - Updated documentation.
index a768d107e04c07f04ce17ca936d71ed548d0f0e2..50757007a277b4a3f301621a29a8152fe8c51065 100644 (file)
@@ -73,8 +73,8 @@ $FoundNotPageList=$FoundValidHTTPCodes=$FoundValidSMTPCodes=0;
 use vars qw/
 $DNSStaticCacheFile
 $DNSLastUpdateCacheFile
-$Lang
 $LogScreenSizeUrl
+$Lang
 $MaxRowsInHTMLOutput
 $BarImageVertical_v
 $BarImageVertical_u
@@ -89,8 +89,8 @@ $BarImageHorizontal_k
 /;
 $DNSStaticCacheFile='dnscache.txt';
 $DNSLastUpdateCacheFile='dnscachelastupdate.txt';
-$Lang='auto';
 $LogScreenSizeUrl='logscreensizeurl';
+$Lang='auto';
 $MaxRowsInHTMLOutput = 1000;
 $BarImageVertical_v   = 'vv.png';
 #$BarImageHorizontal_v = 'hv.png';
@@ -528,7 +528,10 @@ use vars qw/ @Message /;
 'Sender EMail',
 'Receiver EMail',
 'Reported period',
-'Extra/Marketing'
+'Extra/Marketing',
+'Screen sizes',
+'Worm/Virus attacks',
+'Add to favourites'
 );
 
 
@@ -1863,9 +1866,9 @@ sub Read_History_With_TmpUpdate {
                if ($UpdateStats || $MigrateStats || ($HTMLOutput{'main'} && $ShowFileTypesStats) || $HTMLOutput{'filetypes'}) { $SectionsToLoad{'filetypes'}=$order++; }
                if ($UpdateStats || $MigrateStats || ($HTMLOutput{'main'} && $ShowOSStats) || $HTMLOutput{'os'}) { $SectionsToLoad{'os'}=$order++; }
                if ($UpdateStats || $MigrateStats || ($HTMLOutput{'main'} && $ShowBrowsersStats) || $HTMLOutput{'browserdetail'}) { $SectionsToLoad{'browser'}=$order++; }
-               if ($UpdateStats || $MigrateStats || ($HTMLOutput{'main'} && $ShowScreenSizeStats)) { $SectionsToLoad{'screensize'}=$order++; }
                if ($UpdateStats || $MigrateStats || $HTMLOutput{'unknownos'})      { $SectionsToLoad{'unknownreferer'}=$order++; }
                if ($UpdateStats || $MigrateStats || $HTMLOutput{'unknownbrowser'}) { $SectionsToLoad{'unknownrefererbrowser'}=$order++; }
+               if ($UpdateStats || $MigrateStats || ($HTMLOutput{'main'} && $ShowScreenSizeStats)) { $SectionsToLoad{'screensize'}=$order++; }
                # Referers
                if ($UpdateStats || $MigrateStats || ($HTMLOutput{'main'} && $ShowOriginStats) || $HTMLOutput{'origin'}) { $SectionsToLoad{'origin'}=$order++; }
                if ($UpdateStats || $MigrateStats || ($HTMLOutput{'main'} && $ShowOriginStats) || $HTMLOutput{'refererse'}) { $SectionsToLoad{'sereferrals'}=$order++; }
@@ -5270,7 +5273,14 @@ if ($UpdateStats && $FrameName ne 'index' && $FrameName ne 'mainleft') { # Updat
                                        $_errors_h{$field[$pos_code]}++;
                                        $_errors_k{$field[$pos_code]}+=int($field[$pos_size]);
                                        foreach my $code (keys %TrapInfosForHTTPErrorCodes) {
-                                               if ($field[$pos_code] == $code) { $_sider404_h{$field[$pos_url]}++; $_referer404_h{$field[$pos_url]}=$field[$pos_referer]; }
+                                               if ($field[$pos_code] == $code) {
+                                                       my $newurl=$field[$pos_url];
+                                                       $newurl =~ s/([$URLQuerySeparators])(.*)$//;
+                                                       $_sider404_h{$newurl}++;
+                                                       my $newreferer=$field[$pos_referer];
+                                                       if (! $URLReferrerWithQuery) { $newreferer =~ s/([$URLQuerySeparators])(.*)$//; }
+                                                       $_referer404_h{$newurl}=$newreferer;
+                                               }
                                        }
                                        next;
                                }