From: eldy <> Date: Fri, 12 Sep 2003 12:44:32 +0000 (+0000) Subject: Fix not working file type detection for default pages. X-Git-Tag: AWSTATS_WEBMIN_1_0_RELEASE~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aea374e047df46a070e85ac12dcc6a68f71cd287;p=thirdparty%2FAWStats.git Fix not working file type detection for default pages. --- diff --git a/docs/awstats_changelog.txt b/docs/awstats_changelog.txt index dc764228..649e7e96 100644 --- a/docs/awstats_changelog.txt +++ b/docs/awstats_changelog.txt @@ -18,6 +18,7 @@ Fixes: - Fixed not working timezone plugin with 5.7. - Fixed missing propagated configdir parameter when changing month/year. - Error when loading database pm file with some cygwin perl version. +- Fixed not working file type detection for default pages. New features/improvements: - Added %lognamequot tag for LogFormat parameter. diff --git a/wwwroot/cgi-bin/awstats.model.conf b/wwwroot/cgi-bin/awstats.model.conf index af854d36..42e64d1a 100644 --- a/wwwroot/cgi-bin/awstats.model.conf +++ b/wwwroot/cgi-bin/awstats.model.conf @@ -388,7 +388,7 @@ KeepBackupOfHistoricFiles=0 # Default index page name for your web server. # Change : Effective for new updates only -# Example: "default.htm default.html" +# Example: "index.php index.html default.html" # Default: "index.html" # DefaultFile="index.html" diff --git a/wwwroot/cgi-bin/awstats.pl b/wwwroot/cgi-bin/awstats.pl index 2b3a914c..37046185 100644 --- a/wwwroot/cgi-bin/awstats.pl +++ b/wwwroot/cgi-bin/awstats.pl @@ -1191,9 +1191,10 @@ sub Parse_Config { next; } if ($param =~ /^DefaultFile/) { - foreach my $elem (split(/\s+/,$value)) { # No REGEX for this option - if ($elem =~ /^REGEX\[(.*)\]$/i) { $elem=$1; } - else { $elem='^'.quotemeta($elem).'$'; } + foreach my $elem (split(/\s+/,$value)) { + # No REGEX for this option + #if ($elem =~ /^REGEX\[(.*)\]$/i) { $elem=$1; } + #else { $elem='^'.quotemeta($elem).'$'; } if ($elem) { push @DefaultFile,$elem; } } next; @@ -5815,6 +5816,7 @@ if ($UpdateStats && $FrameName ne 'index' && $FrameName ne 'mainleft') { # Updat my $PageBool=1; my $extension; # Extension +print "xxx $urlwithnoquery yyy $DefaultFile[0] zzz"; if ($urlwithnoquery =~ /\.(\w{1,6})$/ || ($urlwithnoquery =~ /[\\\/]$/ && $DefaultFile[0] =~ /\.(\w{1,6})$/)) { $extension=lc($1); if ($NotPageList{$extension}) { $PageBool=0; }