My .htaccess File is Messing Up awstats on Wordpress Blogs
I use DirectAdmin for my hosting control panel. There is a nice plugin to add awstats, but I’ve found they don’t work on sites where I have WordPress set up (such as this site) because I’m using permalinks. No worries though. I found a way to fix it. Just put the bolded line below in your .htaccess:
# BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} !^/awstats.*$ [NC] [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress
*Note: Replace “awstats” with the name of your stats location












xhenxhe, i came across your community post at bumpzee… well, as to this post, why not use an online .htaccess generator or try deleting the .htaccess file… i don’t have a .htaccess file and still everything works… ur right about saying the .htaccess file messes up with some domain-related issues. other experts even recommend that it be deleted so i did for my site
December 20th, 2007 at 8:32 am
Well, I prefer to have it in order to get SEO friendly URLs. This is more important that seeing my site stats.
December 20th, 2007 at 8:38 am
I tried to do this but I still get a 404-message. Should I just write /awstats/ or /domains/topsecret.com/public_html
March 17th, 2008 at 10:26 am
Well, it worked when I wrote it under;
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
That’s a bit weird. But I’m happy as long as it doesn’t hurt me in the long run.
Thank a lot!
March 17th, 2008 at 11:01 am
Well, now it stopped working again. Huh? This is beyond weird.
March 18th, 2008 at 10:53 am
I had no choice. I had to give up on wordpress. I use Godaddy for my hosting. If you don’t run Linux, the hosting is not at all script friendly. I know I should change the hosting or the OS but I’m like an stubborn old man, change is scary! Actually, I’m almost 38, the word “like” doesn’t apply anymore…..:-o
May 3rd, 2008 at 6:34 pm