View Full Version : Page counter won't work within sub folders

10-09-2011, 08:24 AM
I have the page counter provided by Westhost working on pages located in the root, or where the index files is located, however if the page is in a sub folder then the counter doesn't work. Can someone tell me how to fix this? I've called tech support and they are clueless.

10-09-2011, 05:07 PM

It has been a long time since I used the WH counter. It is just an image tag you add to each page you want counted... right? The one thing I can think of off the top of my head is that perhaps you are using a relative link for the image path. If you have not started the path to the image in the sub directories with a forward slash "/" then you need to add it. If that is not it then well try something else. This is an older Site Manager account right?

10-09-2011, 05:18 PM
Opps! I just reviewed the program and the documentation. It is a javascript tag you add. :) Still double check that the path you are using is an absolute path and not a relative one. In other words it needs to start with a forward slash. /cgi-bin/counter/counter.cgi Also you might check your page= if you are using it. I think with it you would need to add the path to the page also. I.E. /supdirectory/index.html

If neither of those work then give me a bit more about what you mean that it is not working. In other words is there nothing showing up on the page in sub directory or is it the wrong number? You might also give me an example URL of a page that is not working. If you don't want to post it here then you can PM it to me.

I have a pretty busy schedule this week but I should be able to get back to you within a 24 hour period. If not I will be back to try and help you I promise.

10-11-2011, 04:51 AM
Hi Shawn

Yes the url has a slash in front like this code which works on the main pages:

<script language="JavaScript" type="text/javascript" src="/cgi-bin/whcounter/whcounter.cgi?display=image&style=odometer"></script>

I've also tried changing it to this:


in both cases nothing shows up on the page.

10-11-2011, 08:21 PM
Lori and I kind of moved to PM mode and solved this issue. I think there where two things going on. First she had the older version of the WH Counter installed on here account so the first thing you would want to do is make sure you have the newest one installed. The way you can tell is by the path to the script it self and it's name. The new one will be /cgi-bin/counter/counter.cgi. No more "wh".

Tech support did install the new counter for her but there was still an issue. Came to find out that here config.txt file located in /cgi-bin/counter/ was a bit off. It should look like this for the image directory variable.

# ----------------->SET THIS FIRST! This is the URL where we will find the counter images!
When I installed a fresh copy it had the correct path with the forward slash but for some reason hers did not. Not sure why but this would fix it.