重写规则htaccess API

I cannot configure .htaccess. It doesn't work.

I have WAMP installed on my Windows machine.

I want a simple rewrite rule, but it doesn't work.

I need to rewrite all urls example.com/api/ to example.com/api.pl/ or just handle route (api) without extension.

I have the following content of the htaccess file

<IfModule mod_rewrite.c> 
RewriteCond %{REQUEST_URI} ^/api/ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ api.tp [QSA,L]
</IfModule>

But it doesn't work.

Please help to solve this problem.