I’ve just migrated one of the sites I maintain and had to re-edit the .htaccess file to allow /stats to be available. Before, every time I tried to visit foo.com/stats it went to a 404 error on my WordPress install (it couldn’t find the page).
This is because I had URL rewriting turned on with my blog, which allows user friendly URLs but can prevent accessing server stats locating in the /stats folder (because it rewrites that too).
The solution is to edit the .htaccess file, which is a file that tells the server how to behave when it comes to URLs.
I use Dreamhost, which has a solution in its wiki. All it takes is firing up TextEdit in plain text mode and adding the following before the WordPress code:
<IfModule modrewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUESTURI} ^/(stats|failed_auth.html).*$ [NC]
RewriteRule . - [L]
</IfModule>
I used Cyberduck to FTP into the site, set it to view hidden files (files starting with a “.” are hidden) downloaded it as a *.txt document edited it, and popped it back on the server (again using Cyberduck). Finally rename the current one to something like htaccess.bak (as a back up) and change the name of the file you just uploaded to “.htaccess”.
And you’re done!


