I have tried a lot of tiny tricks for removing the .php
from a url, but nothing I have tried has worked like I would have hoped. I would like http.php
to redirect to http
.
What I have I tried:
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^(.*)$ $1.php [L,R=301]
and
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule !.*\.php$ %{REQUEST_FILENAME}.php [QSA,L]
also
RewriteCond %{REQUEST_FILENAME} .php$
RewriteRule ^(.*)$ $1
and I would like to reiterate that NOTHING WORKS!
Do any of you have a solution?
PS. I do have RewriteEngine
on, I know this because my site does redirect to https.