There are so many pages on stackoverflow and elsewhere about Redirect. However, I couldn't find a solution to a simple problem: I want every request that ends with a slash to have a permanent 301-redirect to */index.
Examples:
http://example.com/ - should redirect to http://example.com/index
http://example.com/foo/ - should redirect to http://example.com/foo/index
http://example.com/foo/bar/ - should redirect to http://example.com/foo/bar/index
etc.
However, requests not ending with slash should not be redirected:
http://example.com/foo - no redirect.
http://example.com/foo/bar - no redirect.