请各位大神帮我看看这个ThinkPHP路由哪里错了

jjzzggkk 2017-12-19 11:18:22






...全文
147 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
tottyandbaty 2017-12-20
  • 打赏
  • 举报
回复
引用 2 楼 TottyAndBaty 的回复:
RewriteRule ^(.*)$ index.php?/$1 [QSA,PT,L]
就修改这里就好了。就是加了一个问号
tottyandbaty 2017-12-20
  • 打赏
  • 举报
回复
RewriteRule ^(.*)$ index.php?/$1 [QSA,PT,L]
tottyandbaty 2017-12-20
  • 打赏
  • 举报
回复
1.出现这个问题,。首先检查phpinfo 查看 Server API 选项 原因是PHP是fast_cgi模式,而在某些情况下,不能正确识别path_info,所以得改htaccess


<IfModule mod_rewrite.c>
   RewriteEngine on
   RewriteCond %{REQUEST_FILENAME} !-d
   RewriteCond %{REQUEST_FILENAME} !-f
   RewriteRule ^(.*)$ index.php?/$1 [QSA,PT,L]
</IfModule>
注意红色部分

21,886

社区成员

发帖
与我相关
我的任务
社区描述
从PHP安装配置,PHP入门,PHP基础到PHP应用
社区管理员
  • 基础编程社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧