nginx服务器URL无法自动添加index.php
本文介绍了nginx服务器URL无法自动添加index.php的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
问 题
请教个nginx问题,添加try_files $uri $uri/index.php /index.php?$query_string;,类似www.mydomain.com/admin这样的URL可以解析,但是单纯访问www.mydomain.com却提示403错误,www.mydomain.com/index.php这样手动添加index.php后可以正常解析,有遇到类似问题的吗?
解决方案
全局加上
index index.php
如
server {
listen 88;
server_name test.test.com;
charset utf-8;
index index.php # 全局
以下的配置我就不写了
这篇关于nginx服务器URL无法自动添加index.php的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文