How to get rid of /index.php on your WordPress Permalinks

What the problem is: My URL was showing http://www.example.com/index.php/post
What I you want: My URL to show http://www.example.com/post/
How to fix it: Edit or create the .htaccess file to read like this:

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

Additionally, if your blog is NOT on the root of your domain, for example http://www.example.com/blog/post/, then you would edit handle it as follows:

RewriteEngine On
RewriteBase /blog/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blog/index.php [L]

This entry was posted in Tech Tips and tagged , , , . Bookmark the permalink.

Leave a Reply