$document_uri 表示访问的url
现在我的需求是,访问 www.abc.com 请求到 www.abc.com/abc/
在nginx配置文件中加入
1 if ($document_uri !~ 'abc')
2 {
3 rewrite ^/(.*)$ http://www.abc.com/abc/$1 permanent;
4 }
复制代码
转载于:https://blog.51cto.com/2853725/1390984
$document_uri 表示访问的url
现在我的需求是,访问 www.abc.com 请求到 www.abc.com/abc/
在nginx配置文件中加入
1 if ($document_uri !~ 'abc')
2 {
3 rewrite ^/(.*)$ http://www.abc.com/abc/$1 permanent;
4 }
复制代码
转载于:https://blog.51cto.com/2853725/1390984