From: eldy <> Date: Wed, 6 Nov 2002 14:23:01 +0000 (+0000) Subject: Added URLQuerySeparators parameter. X-Git-Tag: AWSTATS_5_2_BETA~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8b97f38be10414af4008db833be6fc6ef7e52034;p=thirdparty%2FAWStats.git Added URLQuerySeparators parameter. --- diff --git a/docs/awstats_benchmark.html b/docs/awstats_benchmark.html index 572accb1..5c14575d 100644 --- a/docs/awstats_benchmark.html +++ b/docs/awstats_benchmark.html @@ -93,7 +93,8 @@ So, have a look at the following chart to:
      - or if you don't need the "domain/countries" report
      - or if your web site has more than 250,000 visits a month.
** Free memory required for update process (in MB).
-Warning: If you use the URLWithQuery or URLReferrerWithQuery option, this value can be dramatically increased.
+Warning: If you use the URLWithQuery or URLReferrerWithQuery option, or forget +to complete correctly URLQuerySeparators for some sites, this value can be dramatically increased.
*** Duration is with Athlon 1GHz/128Mb and LogFormat=1.

@@ -106,8 +107,8 @@ Note that with DNSLookup disabled if you still want to have the 'country/domain' in your log file are already resolved (need to setup your web server to do so, your web server will be slowed). Without DNSLookup, log analyze speed can be increased by 10 to 100 times.
-- Use carefully parameters URLWithQuery and URLReferrerWithQuery. -Let them set to 0 if you don't know what they means.
+- Use carefully parameters URLWithQuery and URLReferrerWithQuery +(Let them set to 0 if you don't know what they means) and check your web site URLs' syntax to known if you need to complete parameter URLQuerySeparators.
- Be sure that your HostAliases parameter list is complete.
diff --git a/docs/awstats_changelog.txt b/docs/awstats_changelog.txt index 803b8a22..251e3976 100644 --- a/docs/awstats_changelog.txt +++ b/docs/awstats_changelog.txt @@ -10,12 +10,14 @@ AWStats Changelog - New parameter: Added OnlyHosts parameter. - New parameter: Added ErrorMessages to use a personalized error messages. - New parameter: Added DebugMessages to not allow debug messages. +- New parameter: Added URLQuerySeparators parameter. - Report for robots accept codes like others charts ('HBL'). - Can use "char+" instead of "char" for LogSeparator. - Records with bad http code for Microsoft Index Servers (on 1 digit instead of 3) are no more reported as corrupted records. - Fixed a bug when using IIS and %query or cs-query-string tag in LogFormat and URLWithQuery=1. +- Added albanian language. 5.1 diff --git a/docs/awstats_config.html b/docs/awstats_config.html index 0a1165d4..dbdff47e 100644 --- a/docs/awstats_config.html +++ b/docs/awstats_config.html @@ -82,6 +82,7 @@ when reading it), follow the example:
  • NotPageList
  • ValidHTTPCodes
  • URLNotCaseSensitive +
  • URLQuerySeparators
  • URLWithQuery
  • URLWithQueryWithoutFollowingParameters
  • URLReferrerWithQuery @@ -795,6 +796,19 @@ when reading it), follow the example:



    +URLQuerySeparators
    +Version : 5.2 +
    +
    # In URL links, "?" char is used to add parameters list in URLs. Syntax is: +
    # /mypage.html?param1=value1 +
    # However, some servers/sites have also others chars to isolate dynamic part of +
    # their URLs. You can complete this list with this parameter. +
    # Example: "?;" +
    # Default: "?" +
    # +
    URLQuerySeparators="?" + +


    + URLWithQuery
    Version : 3.2 +

    # Keep or remove the query string to the URL in the statistics for individual diff --git a/docs/awstats_faq.html b/docs/awstats_faq.html index 0a18af54..ddef582f 100644 --- a/docs/awstats_faq.html +++ b/docs/awstats_faq.html @@ -147,7 +147,7 @@ AWStats can make reports in 30 languages. This is a list of all of them, for las for Lang and ShowFlagLinks parameter) :
    -Bosnian=ba, Chinese (Taiwan)=tw, Chinese (Traditional)=cn, Czech=cz, +Albanian=al, Bosnian=ba, Chinese (Taiwan)=tw, Chinese (Traditional)=cn, Czech=cz, Danish=dk, Dutch=nl, English=en, Finnish=fi, French=fr, German=de, Greek=gr, Hungarian=hu, Indonesian=id, Italian=it, Japanese=jp, Korean=kr, Latvian=lv, Norwegian (Nynorsk)=nn, Norwegian (Bokmal)=nb, Polish=pl, diff --git a/wwwroot/cgi-bin/awstats.model.conf b/wwwroot/cgi-bin/awstats.model.conf index e38af20e..319768f5 100644 --- a/wwwroot/cgi-bin/awstats.model.conf +++ b/wwwroot/cgi-bin/awstats.model.conf @@ -468,6 +468,16 @@ ValidHTTPCodes="200 304" URLNotCaseSensitive=0 +# In URL links, "?" char is used to add parameters list in URLs. Syntax is: +# /mypage.html?param1=value1¶m2=value2 +# However, some servers/sites have also others chars to isolate dynamic part of +# their URLs. You can complete this list with this parameter. +# Example: "?;" +# Default: "?" +# +URLQuerySeparators="?" + + # 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 @@ -627,8 +637,8 @@ MaxRowsInHTMLOutput=1000 # Set your primary language. # Possible value: -# Bosnian=ba, Chinese (Taiwan)=tw, Chinese (Traditional)=cn, Czech=cz, -# Danish=dk, Dutch=nl, English=en, Finnish=fi, French=fr, German=de, +# Albanian=al, Bosnian=ba, Chinese (Taiwan)=tw, Chinese (Traditional)=cn, +# Czech=cz, Danish=dk, Dutch=nl, English=en, Finnish=fi, French=fr, German=de, # Greek=gr, Hungarian=hu, Indonesian=id, Italian=it, Japanese=jp, Korean=kr, # Latvian=lv, Norwegian (Nynorsk)=nn, Norwegian (Bokmal)=nb, Polish=pl, # Portuguese=pt, Portuguese (Brazilian)=br, Romanian=ro, Russian=ru, diff --git a/wwwroot/cgi-bin/awstats.pl b/wwwroot/cgi-bin/awstats.pl index 33e90850..b4d88dc4 100644 --- a/wwwroot/cgi-bin/awstats.pl +++ b/wwwroot/cgi-bin/awstats.pl @@ -45,7 +45,7 @@ $DIR $PROG $Extension $Debug $ShowSteps $DebugResetDone $DNSLookupAlreadyDone /; -$DIR=$PROG=$Extension=""; +$DIR=$PROG=$Extension=''; $Debug=$ShowSteps=0; $DebugResetDone=$DNSLookupAlreadyDone=0; # Time vars @@ -160,13 +160,13 @@ use vars qw/ $DirLock $DirCgi $DirData $DirIcons $DirLang $AWScript $ArchiveFileName $AllowAccessFromWebToFollowingIPAddresses $HTMLHeadSection $HTMLEndSection $LinksToWhoIs $LinksToIPWhoIs $LogFile $LogFormat $LogSeparator $Logo $LogoLink $StyleSheet $WrapperScript $SiteDomain -$ErrorMessages +$URLQuerySeparators $ErrorMessages /; ($DirLock, $DirCgi, $DirData, $DirIcons, $DirLang, $AWScript, $ArchiveFileName, $AllowAccessFromWebToFollowingIPAddresses, $HTMLHeadSection, $HTMLEndSection, $LinksToWhoIs, $LinksToIPWhoIs, $LogFile, $LogFormat, $LogSeparator, $Logo, $LogoLink, $StyleSheet, $WrapperScript, $SiteDomain, -$ErrorMessages)= -('','','','','','','','','','','','','','','','','','','','',''); +$URLQuerySeparators, $ErrorMessages)= +('','','','','','','','','','','','','','','','','','','','','',''); use vars qw/ $color_Background $color_TableBG $color_TableBGRowTitle $color_TableBGTitle $color_TableBorder $color_TableRowTitle $color_TableTitle @@ -1128,6 +1128,7 @@ sub Parse_Config { next; } if ($param =~ /^URLNotCaseSensitive$/) { $URLNotCaseSensitive=$value; next; } + if ($param =~ /^URLQuerySeparators$/) { $URLQuerySeparators=$value; $URLQuerySeparators =~ s/\s//g; next; } if ($param =~ /^URLWithQuery$/) { $URLWithQuery=$value; next; } if ($param =~ /^URLWithQueryWithoutFollowingParameters$/) { foreach my $elem (split(/\s+/,$value)) { push @URLWithQueryWithoutFollowingParameters,$elem; } @@ -1506,6 +1507,7 @@ sub Check_Config { if ($KeepBackupOfHistoricFiles !~ /[0-1]/) { $KeepBackupOfHistoricFiles=0; } if (! $DefaultFile[0]) { $DefaultFile[0]="index.html"; } if ($URLNotCaseSensitive !~ /[0-1]/) { $URLNotCaseSensitive=0; } + if (! $URLQuerySeparators) { $URLQuerySeparators='?'; } if ($URLWithQuery !~ /[0-1]/) { $URLWithQuery=0; } if ($URLReferrerWithQuery !~ /[0-1]/) { $URLReferrerWithQuery=0; } if ($WarningMessages !~ /[0-1]/) { $WarningMessages=1; } @@ -4990,16 +4992,19 @@ if ($UpdateStats && $FrameName ne 'index' && $FrameName ne 'mainleft') { # Updat #----------------------------------------------- # Possible URL syntax for $field[$pos_url]: /mydir/mypage.ext?param1=x¶m2=y#aaa, /mydir/mypage.ext#aaa, / my $urlwithnoquery; + my $tokenquery; my $standalonequery; if ($URLWithQuery) { if ($URLNotCaseSensitive) { $field[$pos_url] =~ tr/A-Z/a-z/; } $urlwithnoquery=$field[$pos_url]; - my $foundparam=($urlwithnoquery =~ s/\?(.*)$//); - $standalonequery="$1"; + my $foundparam=($urlwithnoquery =~ s/([$URLQuerySeparators])(.*)$//); + $tokenquery="$1"; + $standalonequery="$2"; # For IIS setup, if pos_query is enabled we need to combine the URL to query strings - if (! $foundparam && $pos_query >=0 && $field[$pos_query] && $field[$pos_query] ne "-") { + if (! $foundparam && $pos_query >=0 && $field[$pos_query] && $field[$pos_query] ne '-') { $foundparam=1; - $field[$pos_url] .= "?" . $field[$pos_query]; + $field[$pos_url] .= '?'.$field[$pos_query]; + $tokenquery='?'; $standalonequery=$field[$pos_query]; } # Remove params that are marked to be ignored in URLWithQueryWithoutFollowingParameters @@ -5008,16 +5013,17 @@ if ($UpdateStats && $FrameName ne 'index' && $FrameName ne 'mainleft') { # Updat else { map {$field[$pos_url] =~ s/$_=[^&]*//;} @URLWithQueryWithoutFollowingParameters; } # Cut starting or trailing ? or & $field[$pos_url] =~ tr/&/&/s; - $field[$pos_url] =~ s/\?&/\?/; - $field[$pos_url] =~ s/[\?&]$//; + $field[$pos_url] =~ s/[$tokenquery]&/$tokenquery/; + $field[$pos_url] =~ s/[$tokenquery&]$//; } } else { # Trunc CGI parameters in URL if ($URLNotCaseSensitive) { $field[$pos_url] =~ tr/A-Z/a-z/; } - $field[$pos_url] =~ s/\?(.*)$//; + $field[$pos_url] =~ s/([$URLQuerySeparators])(.*)$//; $urlwithnoquery=$field[$pos_url]; - $standalonequery=$1||""; + $tokenquery="$1"; + $standalonequery="$2"; } # Here now urlwithnoquery is /mydir/mypage.ext, /mydir, /