Dreamhost Tip: WordPress & the “stats” folder

Warning: May cause unexpected results with feedburner

Something I just noticed is that if you have a wordpress blog hosted at the root of a domain, you cannot access the /stats folder, since the mod_rewrite code in wordpress over-rides it, and tries to acccess one of it’s own pages. So I’ve just gone a little googling and found that if you add the line:

RewriteCond %{REQUEST_FILENAME} !-U

To the .htaccess file it will allow you to access the stats report, and still keep WordPress happy.

Seems like the Apache Manual is actually useful – http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html#rewritecond – scroll down a bit.

But since I know, well, next to nothing about mod_rewrite this may not be the best/most efficient way of doing it, so if it could cause any problems, or if there is a better way please let me know!

This entry was posted in Hints & Tips. Bookmark the permalink.

3 Responses to Dreamhost Tip: WordPress & the “stats” folder

  1. Paul says:

    I found that this change caused problems with WP, and led to a number of posts becoming unavailable.

    Here’s an alternative:
    http://wiki.dreamhost.com/index.php/Making_stats_accessible_with_htaccess

  2. Lee Findlow says:

    Ahh, that would be a more sensible idea, and I think that it is causing problems with feedburner, it tends to be a bit dodgy at times!

  3. Huw says:

    When that happened to me I just emailed DH support and got them to do it for me. I’m paying them, after all!

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>