Removing trailing slash at the end of file names in a folder
http://www.example.com/directory/index.php/ should return to http://www.example.com/directory/index.php (that is without trailing slash at the end - it can be any file type like html, php, asp )
I tried with RewriteRule ^(.*)/$ $1 [R=301,L] , but when some one type the url with slash at the end it redirects to http://www.example.com/file which should be returned as http://www.example.com/directory/index.php
Help Appreciated.