1、首页,进入linux的命令窗口
2、然后输入以下命令
#vim /usr/local/<a style='color:#f60; text-decoration:underline;' href="https://www.php.cn/zt/16000.html" target="_blank">nginx</a>/conf/nginx.conf
3、编辑linux的设置文件并找到以下代码:
server{ …… location / { index index.htm index.html index.php; #以下是伪静态设置 if (!-e $request_filename) { rewrite ^/(.*)/(.*)/(.*)/(.*)/(.*)/(.*)/(.*)\.html /index.php?m=$1&c=$2&a=$3&$4=$5&$6=$7 last; break; } #以下是伪静态设置 } ……}
4、设置好后按:wq保存编辑
5、最后重启nginx,使用命令:
/etc/init.d/nginx reload
推荐教程:Linux视频教程
Copyright 2014-2024 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号