如何为相同的文件名和目录名设置重写规则?

I have upgrade my Wamp server 2.0 to 2.4.

I had set rewrite url to hide extension.

But after sever upgraded the rewrite rule is not working for same directory name and file name. Here is the structure,

root-

   test/ (Directory)

   test.php (File)

Rewrite rule is as below I have used

RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.+?)/?$ $1.php [L]

The above code was working fine in version 2.0. But after upgrade to 2.4 it is not working for same name file and dirctory. When I used /test/ it goes to test dir, but before this it was gone to test.php file

I have tried different combination but not worked.

Thanks.