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

Blog

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.
ImpressMw

FREE
WEBSITE EVALUATION

Have a site? Need a site? We will review your project free of charge. Let us know your company’s needs and we’ll provide you with the best advise and possible solutions. Click here to get your quote.

GET A FREE WEBSITE EVALUATION

ADDRESS

ImpressM, LLC
PO Box 718
Lake Hopatcong, NJ 07849

973-663-6002

SOCIAL NETWORKS

Contact us