配置需求

注:$document_uri  表示访问的url
需求:访问 www.abc.com  请求到 www.abc.com/abc/

使用操作

1、在nginx配置文件中加入

if ($document_uri !~ 'abc')
{
    rewrite ^/(.*)$ http://www.abc.com/abc/$1 permanent;
}
配置文件

相关文章:

  • 2021-07-07
  • 2022-12-23
  • 2021-09-12
  • 2022-02-07
  • 2021-05-25
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-11-16
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-14
  • 2022-12-23
相关资源
相似解决方案