当前位置:主页 > 查看内容

在phpstudy集成环境下的nginx服务器下配置url重写

发布时间:2021-07-22 00:00| 位朋友查看

简介:直接在对应的vhosts.conf配置文件的location / {}中添加以下内容: location / { index index.html index.htm index.php; #autoindex on; if (!-e $request_filename) { rewrite ^(.*)$ /index.phps=/$1 last; break; } 具体操作过程如下: 1、找到对应的vho……

直接在对应的vhosts.conf配置文件的location / {}中添加以下内容:

location / {
      index index.html index.htm index.php;
  #autoindex on;
  if (!-e $request_filename) {
    rewrite ^(.*)$ /index.php?s=/$1 last;
    break;
  }

具体操作过程如下:

1、找到对应的vhosts.conf配置文件


2、选择所需要配置重写url的站点


总结

以上所述是小编给大家介绍的在phpstudy集成环境下的nginx服务器下配置url重写,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对站长技术网站的支持!
如果你觉得本文对你有帮助,欢迎转载,烦请注明出处,谢谢!


原文链接:https://m.jb51.net/article/175523.htm
本站部分内容转载于网络,版权归原作者所有,转载之目的在于传播更多优秀技术内容,如有侵权请联系QQ/微信:153890879删除,谢谢!

推荐图文


随机推荐