Wanthttp://itsvse.com/index.php?t=3rewritten with pseudo-static ruleshttp://itsvse.com/t3.html, you can add it in conf/nginx.conf in nginx.
Add in location / {}, e.g.
location / { root D:/phpweb/wwwroot; index index.php index.html index.htm; rewrite ^(.*)/t(\d+)\.html$ $1/index.php?t=3 last; }
Look closely at rewrite ^(.*)/t(\d+)\.html$ $1/index.php?t=3 last; In fact, I feel that nginx's pseudo-static rules are quite easy to write. It is to use a rewrite to declare on the basis of the regular, and then ^ is the beginning of the pseudo-static rule, (.*) matches any character, here the match is the domain name, t is the character you want to add here, for example, you can add a classification name such as apple and orange, (\d+) matches the number, \.html matches the suffix, $ is the end of the regular match. The second half is the URL to be rewritten, starting with $1 to indicate the domain name, /index.php?t=3 is the URL to be rewritten, use last; That's it.
|