A few posts back, I was wondering how to remove index.php from my permalink structure of my WordPress blog posts. Well, I spent a long time finding out and asked a few people. I was told to read the tutorial on WordPress Codex but you know me, I never can grasp anything technical or mathematical!
Well, my host did tell me that I should edit my .htaccess file and place the following code to the file and then save it.
At first, I could not find the .htaccess file. So I had to open an index.php file first and then edit the URL by deleting index.php and putting .htaccess in its place. if you are interested in doing this, here is the code to add to your .htaccess file.
I just copied the original file first and saved it in Notepad on my computer as back up, just in case I screwed up and then I the pasted the following at the bottom of the original code.
# BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress
After saving the file, I logged into my WordPress admin dashboard of my blog, went to the options for Permalink and made sure that I selected a Custom structure and removed index.php.
I was a little worried at first, because I have a few blogs hosted on the same server and it looks like that all share the same .htaccess file. But luckily, the old blogs retained the old permalinks [I had no intention to change these blogs, anyway] but for the new ones, I have the pretty permalinks now which goes like this:
http://www.domain.com/year/month/day/post-title
http://www.domain.com/category
http://www.domain.com/page
I do not know if I will have problems later on with this permalink structure but I definitely love it better without index.php somewhere in there!