I am trying to make simple URL rewriting (example: '/toto.html' will be displayed as '/toto' in the URL bar). I have the following code in my .htaccess file, located at the root of my server (/):
ErrorDocument 403 /
ErrorDocument 404 /
Options All +FollowSymLinks -MultiViews -indexes
# Apache Rewrite Rules (-html extensions)
RewriteEngine On
RewriteBase /
RewriteCond %{THE_REQUEST} ^GET\ (.*)\.html\ HTTP
RewriteRule (.*)\.html$ $1 [L,R=301]
It does work: '/toto.html' is rewrited as '/toto'. However, the server keeps trying to redirect me to the page without the .html extension rather than simply rewriting it. I have read a lot of other documented issues about RewriteEngine being ignored and so on, and tried many things, without any success. The server is still trying to interpret the URL rather than just rewriting it.