I have a url rewrite issue on the .htaccess file. There are 2 rules on the file:
rule 1 // When user open "example.com/test.php" on a browser then user will be redirected to "example.com/test".
htaccess rule: RewriteRule ^test.php(.*)$ http://example.com/test/$1 [r=301,nc]
rule 2 // When user will open "example.com/test" we will retrieve the content from "example.com/test.php".
htaccess rule: RewriteRule ^test/ test.php [NC]
Right now those rules are not working, maybe there is a conflict somewhere. What rewrite rules i should use for the above conditions?