AWStats and Dynamic URLs

If you have a plain, straightforward web site where every page has it's own filename then this may not be of much interest to you, however if you use preinstalled scripts such as WordPress, or a website that uses dynamic URLs then read on.

So AWStats is a great little package that pretty much tells you everything you need to know, however the default installation setting (which comes on most hosts) does not display dynamic URLs in the Page views section. So if every page in your site runs off the index.php file and then uses the variables fed through after the question mark (index.php?a=one&b=two&c=three), to determine what to display, then without reading the raw logs you won't know who's gone where within your web site. This is a highly annoying factor to anyone who uses dynamic URLs and need their stats for research. There is a setting in the AWStats config file to switch the analysis of dynamic URLs on however this is often not an option when your web site is hosted on a shared server and you cannot amend the generic config file.

Now when you view your page views and see 1000+ page views for just the root of the domain i.e. / or index.php you'll realise that the information encompasses every page that runs off the root file and not just the actual page "index.php" (or index.asp etc). And yes, this is why I updated my WordPress to rewrite the URLs so that I could read my statistics easier.

There are several methods to combat this issue. One of which is the Apache Mod Rewrite (if you're on Apache that it ;)) which I'm not going to go into the ins and outs as the site does that job itself. However the rewrite rule doesn't really produce exceptionally pretty links. If you look on the 'permalink' of this post it will be /archives/2005/11/23/awstats-and-dynamic-urls/ appended to my domain. Whilst it's informative for a site such as mine (and naturally more useful for something like a blog) you wouldn't want it to look like that on a business web site (well I wouldn't!).

You will hear that this method is often called creating "Search Engine Friendly URLs" it depends on the use and length of your url variables as to how it affects the spidering of your site. Something I'll touch on later :)

  1. 2 Responses to “AWStats and Dynamic URLs”

  2. Gravatar

    "There is a setting in the AWStats config file to switch the analysis of dynamic URLs on however this is often not an option when your web site is hosted on a shared server and you cannot amend the generic config file."

    Yes but what *is* the setting?

    By DrG on Jan 10, 2006

  3. Gravatar

    Apologies, the setting can be found here in the documentation for AWStats

    http://awstats.sourceforge.net.....rWithQuery

    Alternatively open your config file and do a find on "URLReferrerWithQuery" this will be set to zero by default so change this to a numerical one "1"

    By Sarah on Jan 10, 2006

Sorry, comments for this entry are closed at this time.