I’m in the process of setting up my blog. I’m trying to become a blogger and try to do everything the SEO way. Well one of my buddies, who knows way more about SEO than I do, suggesting having all your posts showing clean in the address bar.  

For example my posts would come up like this:

www.joe-ayala.com/index.php/02/25/08/WordPress-mod_rewrite-error/

As I learned today that is not very clean or SEO friendly. So my friend, Brandon Hopkins suggested that I try to have my posts look like this:

www.joe-ayala.com/WordPress-mod_rewrite-error/

Well easier said than done. I originally installed WordPress using Fantastico through my host. No matter what Brandon or I tried we couldn’t get it to work. So I took the parable that Jesus gave about building your house on sand compared to on rock, so I decided to delete it and reinstall it through regular FTP. So I downloaded from WordPress.org and set up my database manually. This is what Fantastico set up for me automatically. 

So I got everything set up and tried to go to Options and Permalinks to set it my path to “/%postname%”.  Yet it still didn’t work.  Checked the permission of my .htaccess file, still nothing worked.  So I did some research and found that their is module called mod_rewrite that needs to be turned on, and some web hosts don’t have it on.  So I contacted my web host and they said it was possible and sent me a link that didn’t work.  So I started searching again and found this post:  mod_rewrite htaccess MYSTERY 

The poster posted this script in order to get .htaccess to work:

# BEGIN WordPress
RewriteEngine On
RewriteBase /wordpress/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /wordpress/index.php [L]
# END WordPress

Now I had to change RewriteBase and RewriteRule to where my WordPress folder is located.  Be careful to keep the “.” in the RewriteRule, if you don’t the .htaccess still won’t work.

Well after this my posts finally looked pretty and clean.