I'd like to be able to hide both index.php and .php from my URLs while using QUERY_STRING.
Right now, I'm successfully hiding index.php (except when accessing certain directories) with the following in my .htaccess:
RewriteEngine On
RewriteCond $1 !^(codex|_core|admin|index\.php) [NC]
RewriteRule ^(.*)$ /index.php?/$1 [L]
I'm doing this because I have certain functions, such as login/logout/registration, acting as pages: example.com/login
However, I also have some static pages that wouldn't benefit from being inside one file with a bunch of PHP functions... such as example.com/terms-and-conditions.php
In the spirit of being uniform, how do I turn that URL into example.com/terms-and-conditions without breaking example.com/login? Is this even possible? I've tried adding the .php removal rewrite about the index.php removal rewrite (obviously removing the .php from index.php) to no avail.
I did try using the solution located here but it broke example.com/login — I assume because the way I'm using functions/queries. Is there just something small I need to change there?