I was setting up an awstats instance today, and noticed the links were being generated wrongly. I have nginx set up to redirect /stats to awstats.pl, but links were being generated to /awstats.pl?foo. Setting WrapperScript = /stats fixed this.
However, my webserver already sets $SCRIPT_NAME to /stats, meaning that the application url is /stats. Is there any particular reason that awstats doesn't use this info?