tp5无法隐藏index.php入口文件,去除index.phhp报错No input file specified

在本地phpstudy环境,根据官方文档https://www.kancloud.cn/manual/thinkphp5/177576进行URL重写,隐藏index.php不好用,百度方案,发现将.htaccess文件进行如下修改。

 

官方文件

<IfModule mod_rewrite.c>  
Options +FollowSymlinks -Multiviews  
RewriteEngine on  
  
RewriteCond %{REQUEST_FILENAME} !-d  
RewriteCond %{REQUEST_FILENAME} !-f  
RewriteRule ^(.*)$ index.php?/$1 [QSA,PT,L]  
</IfModule>

第一种办法修改最后一句 

RewriteRule ^(.*)$ index.php?s=$1 [QSA,PT,L]  

或者

RewriteRule ^(.*)$ index.php?$1 [QSA,PT,L]

 

 

查看 文档链接http://blog.csdn.net/fjnjxr/article/details/73873744

 

  

posted @ 2018-03-13 18:11  狼人杀  阅读(3693)  评论(0)    收藏  举报