phpstudy配置去掉index.php

Nginx

nginx的话就去phpstudy安装目录

找到nginx\conf目录下:phpStudy\nginx\conf。

如果是phpstudy2018版本的话,在phpStudy\PHPTutorial\nginx\conf

nignx/conf下有vhosts.conf这个文件的话,在这个文件里配置,当有这个文件的时候,在nginx.conf里配置是不起作用的。没有的话就在nginx.conf文件配置.

在location/{}

location / {}

加上这句就可以了

try_files $uri $uri/ /index.php?$query_string;

如图:

作者: 高志远

高志远,24岁,男生

发表评论

邮箱地址不会被公开。