How to rewrite urls in WordPress using Permalinks or .htaccess

I am facing a problem while coding my website. The urls are not as per our needs… We want to re-write our urls from…
http://websitename.com/state/city/product/
to…
http://websitename.com/product-in-city-state/

All your help and support is welcome.
Appreciate any help!

Read More

Here is the existing contents of the .htaccess file:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

Related posts