The final effect is as follows:
In fact, it is very simple, first create a test.php file in the HTML directory, as follows:
Then use VI to open him, write a test source code, the source code is as follows:
Then save exit, go to/usr/local/nginx/conf to find nginx.conf configuration file, modify it.
In the 46 line to add the rules can be modified, white to play regular expression just, "$" is the NGINX reserved variables, directly use can
Rewrite leigood-(\d+) \.html/test.php?id=$1;
After the modification is complete, go back to the Sbin directory and execute the following command:
./nginx-s Reopen
This is done, this is called him as a URL rewrite, there are also people who call him pseudo static page, the name is different, but the content and role is the same ....
Kill Thunder Dog---linux no:37 linux under nginx URL rewrite or pseudo-static page