Fixing Dreamhost Stats
I am hosting a few sites over on Dreamhost (best host on the planet!) and came up against a problem the other day that I am sure many others have faced. One of the sites is running Textpattern and is using the /section method to write links. This, of course, activates the mod_rewrite module and sticks the rewrite rules in to an .htaccess file.
Once you do this, and then try to go to your Dreamhost-generated webstats (domain.com/stats), you will get a 404 error. Here is a quick solution for fixing this. Add these lines to the top of your .htaccess file in your webroot, just after the “RewriteEngine On” line:
RewriteCond %{REQUEST_URI} ^/stats/(.*)$ [OR]
RewriteCond %{REQUEST_URI} ^/failed_auth.html$
RewriteRule ^.*$ - [L]
That should do it. Upload the .htaccess file back to your webroot and you should be good to go. I think this also occurs if you use the One-Click install for Wordpress from the Dreamhost control panel.




