How to configure url rewriting in nginx with wordpress

Here are the instructions to configure the url rewriting in nginx with wordpress

///////////////////////////////////////////////////////////
////////URL rewriting with nginx and wordpress/////////////
///////////////////////////////////////////////////////////

//open the below file 

/etc/nginx/sites-available/yourdomain.com

//add this line in your website configuration in the server block

try_files $uri $uri/ /index.php?$uri&$args;

///////////////////////////////////////////////////////////
////////URL rewriting with nginx and wordpress/////////////
///////////////////////////////////////////////////////////