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