Results 1 to 2 of 2

Thread: Stats for Apache

  1. #1
    Senior Member
    Join Date
    Oct 2001
    Posts
    689

    Post Stats for Apache

    Hello all, I am looking for help with managing my webserver. Im running Apache on linux, and Im looking for software that can help manage my site statistics. For instance, unique IP's, the page it linked from, OS and browser, and the page it was linked from. I am also looking for some code that will forward a user who types one url in, to a different page. Any help would be appreciated.
    Wine maketh merry: but money answereth all things.
    --Ecclesiastes 10:19

  2. #2
    AO Antique pwaring's Avatar
    Join Date
    Aug 2001
    Posts
    1,409
    Depends how you want to collect and collate the data. A lot of information can be found in the server logs, and a simple grep script could collect useful data for you. This of course requires access to the server logs, which not all hosting companies will allow.

    An alternative is some kind of scripting on your website, as PHP, ASP CGI etc. that records the IP, OS etc. of your viewer (most of the data you want can be found in the preset environment variables, or through some simple scripting to get the OS/Browser of your visitors - although this can be incorrect if someone uses a browser such as Opera).

    I am also looking for some code that will forward a user who types one url in, to a different page
    There's two different ways of doing this, the easiest is to create a basic HTML page at the original URL and insert the following code:

    <html>
    <head>
    <title></title>
    <META HTTP-EQUIV="refresh" CONTENT="x; URL=http://www.somesite.com/">
    </head>
    <body bgcolor="#000000" text="#000000" id="all" leftmargin="10" topmargin="10" marginwidth="10" marginheight="10" link="#000020" vlink="#000020" alink="#000020">


    Please go to: www.somesite.com if you are not automatically redirected.</p>
    </body>
    </html>

    N.B. Ignore all that stuff inside the <body> tag, it seems to be added automatically by the AO parsing engine.

    This will send your visitors to www.somesite.com after X seconds (make sure you change both the URLs and X - set X to a reasonable number such as 5).

    Alternatively, you can create an entry in the .htaccess file in Apache like so:
    Redirect oldURL newURL

    E.g.
    Redirect http://www.somesite.com/ http://www.someothersite.com/

    Hope this helps!
    Paul Waring - Web site design and development.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •