Is WordPress .htaccess Making Your Life Miserable?

(If you’re a regular here and don’t know what .htaccess is, lucky you. Move along to another post.)

If you’re reading this you’ve broke your wordpress site and you’re pissed. Relax a little bit. Don’t delete anything. Don’t call customer support. I will solve your problem.

You may have noticed that a Google search yielded all kinds of crap information or maybe you asked Matt Berman.

Q: Who should I not ask for help? Peter, San Jose, California

A: Good question Peter. To review, you should not ask Matt Berman or anyone who is not me for help.

Q: What does this Wrong Matt Berman look like?

A:

(Matt Berman, right)

Ok let’s get down to business:

Very simply, the htaccess rules for all WordPress permalinks1 are either #1 or #2:

[ #1 ] If WordPress installed in the root directory »

# BEGIN WordPress<IfModule mod_rewrite.c>

RewriteEngine On

RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule . /index.php [L]

</IfModule>

# END WordPress

[ #2 ] If WordPress installed in a subdirectory called “foo” »

# BEGIN WordPress<IfModule mod_rewrite.c>

RewriteEngine On

RewriteBase /foo/

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule . /foo/index.php [L]

</IfModule>

# END WordPress

1 Note: These are valid for standard permalink structures with a standard WordPress install and may not operate effectively for non-standard or highly specialized configurations. I assume that if you are hard at work hacking and tweaking some bitchen’ SEO boner popping permalink system, you already know what you’re doing and aren’t reading this.

Hope this helped. If it did leave a comment or bookmark me.


Yahoo! Small Business

If you’re not so good with fixing your blog, you might need to take a web design program. You don’t need to get a formal online education, but it wouldn’t be a bad idea to take a few college courses online that focus on web design and development.

Comments

comments

5 thoughts on “Is WordPress .htaccess Making Your Life Miserable?

Leave a Comment