.htaccess文件中的URL重写

I am trying to do the below conversion :

http://mywebsite.com/pune/menu_url.php?shopcode=10 
to 
http://mywebsite.com/pune/menu/

However I dont know where to write the rewrite code ,I know there is an .htaccess file for that but then where this files resides? In my home directory or the pune directory(in my case)?

Also I dont know if this file already exists or I need to create it.

I have created a .htaccess file in my subdirectory (pune) and wrote the below code but thats not working

Options +FollowSymLinks
RewriteEngine On

RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-f

RewriteRule ^menu/(\d+)*$ ./menu_url.php?shopcode=$1

My main requirement is that, whenever a user clicks on a menu button on /pune/index.html the url to be shown in the upper url box should be /pune/menu/ instead of /pune/menu_url.php?shopcode=10

Try this in the .htaccess you have in your pune folder:

Options +FollowSymLinks

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /pune/

RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-f

RewriteRule ^/pune/menu/(\d+)*$ ./pune/menu_url.php?shopcode=$1
</IfModule>

I've added <IfModule mod_rewrite.c> and RewriteBase /pune/