使用.htaccess重定向错误

I want to configure a redirect with .htaccess. This works partial.

When I open the page: www.example.com/workflow -> Everything works fine

When I open the page: example.com/workflow -> the redirect to www.example.com/workflow.php But it should redirect to www.example.com/workflow (because duplicate content)

Where is my mistake in the configuration? Can somebody help me?

RewriteEngine On

RewriteCond %{HTTP_HOST} ^example.com$ [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]

RewriteCond %{THE_REQUEST} index\.php [NC]
RewriteRule ^index\.php$ http://www.example.com/ [NC,R=301]


Redirect /facebook https://www.facebook.com/example/

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^workflow/$ workflow.php [L]

Change this line:

RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]

to this:

RewriteRule ^(.*)$ http://www.example.com/$1 [NC,R=301]

That should fix it