Tweaking Webalizer

Looking at Webalizer's reports, I have just noticed that webpages returning a 302 do not get into the Total URLs listing.

I do not know if this is a bug or not, but a 302 is a Moved Temporarly status code. I do want to count those since it reflects how many people I am bouncing elsewhere. This simple patch does the trick:

--- webalizer.c 2002-04-16 18:11:31.000000000 -0400
+++ webalizer.c.new     2005-08-11 11:02:52.000000000 -0400
@@ -1080,7 +1080,7 @@
          
      /* URL/ident hash table (only if valid response code) */
      if ((log_rec.resp_code==RC_OK)||(log_rec.resp_code==RC_NOMOD)||
-         (log_rec.resp_code==RC_PARTIALCONTENT))
+         (log_rec.resp_code==RC_PARTIALCONTENT)||
+         (log_rec.resp_code==RC_MOVEDTEMP))
      {
         /* URL hash table */
         if (put_unode(log_rec.url,OBJ_REG,(u_long)1,

What would I become without having access to source code...

Trackbacks

No Trackbacks

Comments

Display comments as (Linear | Threaded)

  1. Adam says:

    Found this with google today.. you saved me a lot of work, cheers bro

  1. Nathan says:

    How did you implement this? I think I'm getting the same problem.


Add Comment


Enclosing asterisks marks text as bold (*word*), underscore are made via _word_.
E-Mail addresses will not be displayed and will only be used for E-Mail notifications

To prevent automated Bots from commentspamming, please enter the string you see in the image below in the appropriate input box. Your comment will only be submitted if the strings match. Please ensure that your browser supports and accepts cookies, or your comment cannot be verified correctly.
CAPTCHA