I have edited my .htaccess file succesfully, by writing this code:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php
This enables me to get rid of the .php extension on my url. The problem now is that if I right click on a element of my website, I still see the .php url. If I remove it manually, the site is still visible, so the code works very well I guess, but how can I solve the “right-click issue” too?
PS: a second question… Does this effect the SEO of my website in any way?
It sounds like the code of your pages still contains links to your
.phppages, containing the extension. You can easily get rid of them by modifying your own code to remove.phpfrom the ends of links or asset names. (And no, this won’t affect SEO at all.)