I'm dealing with wordpress in apache.Now am in very large trouble.I have to rewrite my url. I'm trying with this code for .htaccess file

<IfModule mod_rewrite.c>
RewriteEngine On

RewriteBase /shopboxcms/

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d [OR]
RewriteCond %{REQUEST_FILENAME} gallery\_remote2\.php
RewriteCond %{REQUEST_FILENAME} !main\.php
RewriteRule . - [L]
RewriteRule ^wp-admin\/widgets111\.html$ /wordpress/wp-admin/widgets.php
RewriteRule ^hai$ http://localhost/shopboxcms/index.php?productid=62953
</IfModule>

But applying this .htaccess file whenever we attempt to call http://localhost/shopboxcms/hai which shows http://localhost/shopboxcms/?productid=62953 however i require the reverse. How do i solve it?

Thank you for dealing with my problem.Finally i acquired the solution...right here i'm discussing...

RewriteEngine On

RewriteBase /

RewriteCond % -f [OR] RewriteCond % -d [OR] RewriteCond % gallery_remote2.php RewriteCond % !primary.php RewriteRule . - [L] RewriteRule ^[A-Za-z--9,"'-]+-([-9]+)$ demo/index.php?productid=$1