I have looked at this question which describes how to redirect a url in nginx, as shown below
# main server block for www.test.com
server {
    listen       80;
    server_name  www.test.com;
    ...
}
# redirect test.com to www.test.com
server {
        server_name test.com;
        return 301 $scheme://www.test.com$request_uri;
}
What I need to do is redirect a set of individual pages, so was wondering how to do this
e.g. test.com\index , test.com\home , test.com\main to test.com\index.php
Then I have some other pages to simply redirect simply to the .php extension
e.g. test.com\about to \test.com\about.php 
e.g. test.com\contact to \test.com\contact.php
What is the best way to do this?
 
    