phpstudy配置去掉index.php

Apache

第一步:

打开phpstudy=》其他选择菜单=》php扩展及设置=》Apache 模块

第二步: 

找到rewrite_module,开启rewrite_module就行了


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;

如图



猜你喜欢

转载自blog.csdn.net/qq_38375394/article/details/80361764
今日推荐