Been trying for days to configure correctly .htaccess but not impossible to implement what you want.
If the user enters:
www.site.com redirect to site.com
www.site.com redirect to site.com
site.com/article redirect to site.com/article/
There is also a problem if the user enters site.com/index.php/article as site.com/article
RewriteEngine on RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule (.*) /index.php?$1 [QSA,L]