#1 访问 /baism00.html 的时候,页面内容重写到 /index.html 中
rewrite /baism00.html /index.html last;
#2 访问 /baism01.html 的时候,页面内容重写到 /index.html 中,并停止后
续的匹配
rewrite /baism01.html /index.html break;
#3 访问 /baism02.html 的时候,页面直接302定向到 /index.html中
rewrite /baism02.html /index.html redirect;
#4 访问 /baism03.html 的时候,页面直接301定向到 /index.html中
rewrite /baism03.html /index.html permanent;
#5 把 /a/*.html => /b/*.html ,301定向
rewrite ^/a/(.*?).html$ /b/$1.html permanent;
#6 把 /search/key => /search.html?keyword=key
rewrite ^/search\/(.*?)$ /search.html?keyword=$1 permanent;
vi default