I tried a lot of code to remove .php
from url
for example – ht.abuena.net/presto.php
-> ht.abuena.net/presto
and vice versa – internally
RewriteEngine ON
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^(.*)$ $1.php [NC,L]
nothing works – the url stays unchanged
page is reloading by right clicking on the button Reload
and choosing – Empty Cache and Hard Reload
– so I hope the cache is cleared
live example here – here
2
Answers
With your shown samples, please try following htaccess rules file.
Please make sure to clear your browser cache before testing your URLs.
In my case if the project is core PHP one, I use the below lines in .htaccess file: