HTACCESS rules error : In my htaccess file I have added a rule to redirect url/abc/xyz to url/abc/xyz.php so now even when I try to access url/abc.php it redirects me to url/abc/

Help me with this.. My code now :
  
    
    # To externally redirect /dir/foo.php to /dir/foo
    RewriteCond %{THE_REQUEST} ^GET\s([^.]+)\.php\s [NC]
    RewriteRule ^ %1 [R,L]
    
    ## To internally forward /dir/foo to /dir/foo.php
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME}.php -f
    RewriteCond %{QUERY_STRING} ^$
    RewriteRule ^(.*?)/?$ $1.php [L]

