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


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

?

1
2
3
4
5
6
7
location / {
??????index index index index.php;
??#autoindex on;
??if (!-e $request_filename) {
????rewrite ^(.*)$ /index.php?s=/$1 last;
????break;
??}






具体操作过程如下:

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

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

总结

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

原文链接:cnblogs/MingGyGy-Castle/archive/2019/12/02/11968608


上一篇:apache启用gzip压缩的实现方法

下一篇:网站服务器怎么设置禁止Ping?


Copyright © 2002-2019 测速网 https://www.inhv.cn/ 皖ICP备2023010105号 城市 地区 街道
温馨提示:部分文章图片数据来源与网络,仅供参考!版权归原作者所有,如有侵权请联系删除!
热门搜索