我需要赶上,如果我的url包含一个小的substr,保持原有的url,只重写那小部分,我怎么能做到这一点?
例如:
http://foobar.com/foo-bar-substrtocatch-baz
应该成为
http://foobar.com/foo-bar-changedsubstr-baz
提前致谢…
rewrite ^(.*)substrtocatch(.*)$ $1changedsubstr$2;