I finally found out how to do it.
Warning: I have no experience with mod_rewrite, so this may not be the best solution. It works for me though.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUESTFILENAME} !-f
RewriteRule ^(.*)/$ /$1/index.php [L]
</IfModule>