I have a classified ads website using a proprietary script and now I am moving it to Wordpress. I want to redirect the old URLs to Wordpress URLs.
The script has two main URL types:
Category URL:
/category/id-of-category[/page-number]/category-name.html
eg.:
/category/15/cars.html
/category/15/3/cars.html (the 3 is for pagination)
it should redirect to /?cat=15Listing URL:
/category/id-of-category/category-name/listings/id-of-ad/ad-title.html
eg.:
/category/15/cars/listings/12345/selling-my-old-toyota.html
it should redirect to /?p=12345
I want to know the exact nginx configuration that would do the permanent redirection to new URL on the same domain name.