Allow Multiple Logins/Users for Mint Stats Tracker

I have been testing the Mint PHP web statistics script for my development sites lately, and though I love it and the modular plugins you can get for it, one feature is sorely lacking – multiple user logins.

This quick hack is by no means revolutionary, but it certainly does get the job done.

A new feature in Mint 1.2.x is to allow what’s called a “client mode” where anyone can access the statistics without the need to login. While this works for locally hosted Mint installations, the is definitely sub-optimal when it comes to a production site.

The solution? I’m sure you may have guessed it already, but by using .htaccess, you can easily set up multiple logins to Mint!

In my case I use subdomains like Using SSH, I logon to, and issue this command:

pico .htaccess

In order to add user to the file, you must append the .htaccess file with lines similar to this htaccess guide.

You’ll need to encrypt the usernames and passwords, but once it’s done you will have logins enabled.

Please note that this method is susceptible to a brute-force attack, but it will keep most people from poking around with your stats.

Once I have figured out a better way (using PHP for example) I will post it here too.

Dreamhost Stats Rewriting and Typo with .htaccess

If you run Ruby on Rails apps, or a Typo installation on Dreamhost, you may have noticed that you cannot access your stats page. Here’s the code that will get it running, quick and dirty, and have you poring over stats for HOURS!

You’ll want to login to your server using SSH, then edit the .htaccess file in your public folder, from within your home directory. Here’s how I did it as an example:

# pico /

Cut and paste the following code:

# This is the stats rewrite rule for use with Dreamhost

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} ^/stats/(.*)$ [OR]
RewriteCond %{REQUEST_URI} ^/failed_auth.html$
RewriteRule ^.*$ - [L]

(select the code, use CTRL+C on windows, or APPLE+C on a Mac, then to paste use SHIFT+INSERT on most SSH clients, or simply right-click and select paste from the menu)

You can put this anywhere in the .htacess file and it should work, as long as it is after the

RewriteEngine On

rule that already exists.