Viewing: One Entry

Friendly Reminder - mod_rewrite needs AllowOverride All

February 17, 2008 @ 02:15:56

Running Wordpress locally and not sure why the permalink or category pages are resulting in 404 errors?

It’s more than likely due to mod_rewrite not being allowed to do its job. If you don’t know anything about mod_rewrite, here is a nice howto. Also, of course, is Apache’s own documentation.

In a nutshell, the redirects created by Wordpress in your .htaccess need the authority to send a page request elsewheres. Open httpd.conf and make sure that you have AllowOverride set to All.

e.g.


Options Indexes FollowSymlinks MultiViews
AllowOverride All
Order allow,deny
Allow from all

I don’t mean in the default “<Directory />” section of httpd.conf, I mean in the actual domain. For example, you’re testing Wordpress and you’ve got something like:

    Alias /wp "F:/webSites/wordpress"

Make sure you also have:


<Directory "F:/webSites/wordpress">
    Options Indexes FollowSymlinks MultiViews
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>

Of course, mine was set to “None” instead of “All”.

Note also that you will obviously need to tell Apache to load that module by making sure the following line is uncommented (with ‘#’ characters denoting line comments):

    LoadModule rewrite_module modules/mod_rewrite.so

I spent way too much time trying to figure out what was wrong. It’s almost always the case that the longer you spend trying to debug a specific problem, the more likely it is that the solution is dead simple.

No Comments

Comments can be removed at any time for any reason. Thanks.