永发信息网

http://localhost/xx/?p=10 无法解译,nginx 怎么重写成http://localhost/xx/index.

答案:1  悬赏:50  手机版
解决时间 2021-04-03 04:55
  • 提问者网友:精神病院里
  • 2021-04-02 16:53
http://localhost/xx/?p=10 无法解译,nginx 怎么重写成http://localhost/xx/index.php?p=10
最佳答案
  • 五星知识达人网友:迷人又混蛋
  • 2021-04-02 17:06
你这个不需要做重写啊,你只需要把 index 这个相关指令改一改就可以了:


在server指令段下面的 index 指令
index  index.php index.html index.htm;location ~  .php  这个指令里面的
fastcgi_index  index.php;

这样,默认访问到的文件才是index.php
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯