.htaccess错误与菜单URL所有相同的目的地

I have a problem with my htaccess. I did that profile.php?id=1 it turns into profile/id/1 it works fine.. But my problem is that in the page profile/id/1 in the top menu for example I go with the mouse on "index"and I see profile/id/1/index.php and not only /index.php

in five words... .htaccess change all urls and not only profile/id/1

UPDATE for Security Reasons I would do when I write /example.php redirect me to a error page and when I write /example it redirect to the right website.

Options +FollowSymLinks -MultiViews
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^(css|js|images)/(.*)?$ /$1/$2 [L,QSA,R=301]
RewriteRule ^(.+)/profile/id/([^/.]+)$ $1/profile.php?id=$2 [NC,L]
# php extension to no extension url
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s([^.]+)\.php [NC]
RewriteRule ^ %1 [R,L,NC]
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^ %{REQUEST_URI}.php [L]

It doesn't work..

Thanks for the help!