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

 

  


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM