I am working according to this question (Redirect .php urls to urls without extension) but this sends me to root folder.
RewriteEngine On
# browser requests PHP
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^\ ]+)\.php
RewriteRule ^/?(.*)\.php$ /$1 [L,R=301]
# check to see if the request is for a PHP file:
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^/?(.*)$ /$1.php [L]
for eg. my orginal url http://www.website.com/products/abc.php
after redirect it sends me to http://www.website.com/abc