phpstudy-linux面板(小皮面板)具有轻巧、便捷和功能强大等优势,是PHP环境搭建的首选。今天绵阳动力建设来为大家介绍新版的小皮(phpstudy)集成环境中nginx服务器下配置url重写的实现方法:
直接在对应的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的站点
保存后系统自动重启nginx服务,再刷新网站就可以实现url重写了。
地址:绵阳市临园路东段78号B座13层
电话:0816-6339181
邮箱:kf@kf51.cn
微信公众号:
Copyright © 绵阳动力网站建设 www.kf51.cn All Rights Reserved 蜀ICP备08100083号