I know there are many topics. I tried them many times, but it doesn't work.
What do I want?
Instead of example.com/en/file.php, users see only example.com/en/file.
My .htaccess file:
DirectoryIndex index.php index.html
RewriteEngine on
*RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ /$1.php*
ErrorDocument 404 /index.php
RewriteCond %{HTTP_HOST} ^example\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.example\.com$
RewriteRule ^ru\/index\.php$ "http\:\/\/example\.com\/ru\/" [R=301,L]
RewriteCond %{HTTP_HOST} ^example\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.example\.com$
RewriteRule ^en\/index\.php$ "http\:\/\/example\.com\/en\/" [R=301,L]
etc. for every language
What do I have to add to hide extensions?
After it works, should I use links between pages as "file.php" or only "file"?
RewriteRulesyntax - it's the opposite. The first is "what to rewrite", the second is "the result of rewriting"