I've looked around, and most things either seem overkill, or I'm just not understanding something.
I've got the following URLs:
http://cms.dev/article.php?post_id=6
And I like to replace them with
http://cms.dev/article/6/
I've got the following code:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^\.]+)$ $1.php [NC,L]
However, this just cleans URLs like /admin.php
to /admin
.
What is the best way to clean a URL, but keep the .php removed from other pages?